collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: [SOLVED] StartBot.php won't work on Slackware  (Read 3842 times)

0 Members and 1 Guest are viewing this topic.

Offline Oolwe

  • BeBot User
  • **
  • Posts: 47
  • Karma: +0/-0
[SOLVED] StartBot.php won't work on Slackware
« on: February 04, 2011, 04:03:51 pm »
Hi,

i'munable to start Bebot with the StartBot.php script, i've read a lot of post about similar problemes, but still unable to find a solution.

Code: [Select]
$ php StartBot.php
PHP Notice:  Undefined offset:  1 in /home/drlee/.bebot-0.6.8/Sources/Conf.php on line 47
PHP Notice:  Undefined property: Conf::$cf in /home/drlee/.bebot-0.6.8/Sources/Conf.php on line 70
PHP Notice:  Undefined offset:  1 in /home/drlee/.bebot-0.6.8/StartBot.php on line 75
Starting bebot with: /usr/bin/php -c ./  /home/drlee/.beBot-0.6.8/Main.php
PHP Notice:  Undefined variable: pw in /home/drlee/.bebot-0.6.8/StartBot.php on line 101
PHP Warning:  PHP Startup: mm_create(0, /session_mm_cli1000) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0
Could not open input file: /home/drlee/.beBot-0.6.8/Main.php
PHP Notice:  Undefined variable: pw in /home/drlee/.bebot-0.6.8/StartBot.php on line 101
PHP Warning:  PHP Startup: mm_create(0, /session_mm_cli1000) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0
Could not open input file: /home/drlee/.beBot-0.6.8/Main.php
PHP Notice:  Undefined variable: pw in /home/drlee/.bebot-0.6.8/StartBot.php on line 101
PHP Warning:  PHP Startup: mm_create(0, /session_mm_cli1000) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0
Could not open input file: /home/drlee/.beBot-0.6.8/Main.php
PHP Notice:  Undefined variable: pw in /home/drlee/.bebot-0.6.8/StartBot.php on line 101
PHP Warning:  PHP Startup: mm_create(0, /session_mm_cli1000) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0
Could not open input file: /home/drlee/.beBot-0.6.8/Main.php
PHP Notice:  Undefined variable: pw in /home/drlee/.bebot-0.6.8/StartBot.php on line 101
PHP Warning:  PHP Startup: mm_create(0, /session_mm_cli1000) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0
Could not open input file: /home/drlee/.beBot-0.6.8/Main.php

commenting this in the StartBot.php
Code: [Select]
        $php_bin = "/usr/bin/php";
        //$php_args = " -c ./ ";
        $main_php = "/home/drlee/.beBot-0.6.8/Main.php";

return this, with the last error repeating in a loop:
Code: [Select]
$ php StartBot.php
PHP Notice:  Undefined offset:  1 in /home/drlee/.bebot-0.6.8/Sources/Conf.php on line 47
PHP Notice:  Undefined property: Conf::$cf in /home/drlee/.bebot-0.6.8/Sources/Conf.php on line 70
PHP Notice:  Undefined offset:  1 in /home/drlee/.bebot-0.6.8/StartBot.php on line 75
PHP Notice:  Undefined variable: php_args in /home/drlee/.bebot-0.6.8/StartBot.php on line 92
Starting bebot with: /usr/bin/php /home/drlee/.beBot-0.6.8/Main.php
PHP Notice:  Undefined variable: pw in /home/drlee/.bebot-0.6.8/StartBot.php on line 101
Could not open input file: /home/drlee/.beBot-0.6.8/Main.php
PHP Notice:  Undefined variable: pw in /home/drlee/.bebot-0.6.8/StartBot.php on line 101
Could not open input file: /home/drlee/.beBot-0.6.8/Main.php
PHP Notice:  Undefined variable: pw in /home/drlee/.bebot-0.6.8/StartBot.php on line 101
Could not open input file: /home/drlee/.beBot-0.6.8/Main.php
PHP Notice:  Undefined variable: pw in /home/drlee/.bebot-0.6.8/StartBot.php on line 101
Could not open input file: /home/drlee/.beBot-0.6.8/Main.php
PHP Notice:  Undefined variable: pw in /home/drlee/.bebot-0.6.8/StartBot.php on line 101
Could not open input file: /home/drlee/.beBot-0.6.8/Main.php
PHP Notice:  Undefined variable: pw in /home/drlee/.bebot-0.6.8/StartBot.php on line 101

Code: [Select]
$ /usr/bin/php -c Main.php
PHP:  Error parsing /home/drlee/.bebot-0.6.8/Main.php on line 5
PHP Warning:  PHP Startup: mm_create(0, /session_mm_cli1000) failed, err mm:core: failed to open semaphore file (Permission denied) in Unknown on line 0


Bot work with this:
Code: [Select]
/usr/bin/php Main.php

modified config in /etc/httpd/php.ini:
Code: [Select]
;session.save_path = "/var/lib/php"
session.save_path = "/tmp"

help appreciated ;)
regards.

note: i'm not native English
« Last Edit: February 08, 2011, 11:10:02 am by Eelwo »

Offline Getrix

  • Contributor
  • *******
  • Posts: 509
  • Karma: +0/-0
Re: StartBot.php won't work on Slackware
« Reply #1 on: February 04, 2011, 04:55:54 pm »
If you run Slackware without much Linux knowledge i would recommend you to change Distro as its not the most friendly out there now..
I used Slackware for years before my free times was shrinking, and what i learned to do was use google.com allot. Its the one thing you really need start learn use if you gonna stick to Slackware...

But for your problem, type "php --version" and you will probably find out its not the bot that's the problem...
Check if your user have access to: session.save_path = "/tmp"
As the error tells you: failed to open semaphore file (Permission denied)
Success is not final, failure is not fatal: it is the courage to continue that counts.
- Sorry, i dont have time to reply question on PM. Make a topic.

Offline Oolwe

  • BeBot User
  • **
  • Posts: 47
  • Karma: +0/-0
Re: StartBot.php won't work on Slackware
« Reply #2 on: February 04, 2011, 05:17:53 pm »
Hi,

Thanks for quick reply, in fact i use Slackware since some years now and i'm pretty happy with it, but yes it's not the most friendly Lynux, anyway bot start and work fine if i use the command:
Code: [Select]
php Main.php &

php --version
Code: [Select]
PHP 5.2.10 (cli) (built: Jul 11 2009 16:35:04)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

/tmp
Code: [Select]
drwxrwxrwt   9 root root  4096 2011-02-04 17:23 tmp/

i really want the bot to be able to restart and to be started from the rc.local as a user on boot.

Offline Oolwe

  • BeBot User
  • **
  • Posts: 47
  • Karma: +0/-0
Re: StartBot.php won't work on Slackware
« Reply #3 on: February 06, 2011, 04:25:12 pm »
Up!

need help pls ;)

Offline Shelly

  • BeBot Apprentice
  • ***
  • Posts: 192
  • Karma: +0/-0
Re: StartBot.php won't work on Slackware
« Reply #4 on: February 06, 2011, 07:52:47 pm »
try cd bothome; php -f Startbot.php botname &

bot home would be "/home/drlee/.bebot-0.6.8/" and the botname would be the character you use as the bot.

the 1st time thru using this method you should do it in the foreground (A.K.A. with out the "&") to ensure your config files get created correctly...

If you are running as a user (highly recommended) log in as that user and make sure that the user has access to all the bot's folders. You could be experiencing permissions problems.

Offline Oolwe

  • BeBot User
  • **
  • Posts: 47
  • Karma: +0/-0
Re: StartBot.php won't work on Slackware
« Reply #5 on: February 07, 2011, 11:51:31 am »
Hi,

here's some new test following indication ;)

put the rights to the user running bot
Code: [Select]
chown drlee.drlee .bebot-0.6.8/ -R

Code: [Select]
drlee@shootox:~/.bebot-0.6.8/conf$ cp Bot.conf Clan.Bot.conf

cd the bebot directory and try to start it
Code: [Select]
drlee@shootox:~/.bebot-0.6.8$ php -f StartBot.php Clan
PHP Notice:  Undefined property: Conf::$cf in /home/drlee/.bebot-0.6.8/Sources/Conf.php on line 70
PHP Notice:  Undefined variable: php_args in /home/drlee/.bebot-0.6.8/StartBot.php on line 92
Starting bebot with: /usr/bin/php /home/drlee/.beBot-0.6.8/Main.php Clan
PHP Notice:  Undefined variable: pw in /home/drlee/.bebot-0.6.8/StartBot.php on line 101
Could not open input file: /home/drlee/.beBot-0.6.8/Main.php
PHP Notice:  Undefined variable: pw in /home/drlee/.bebot-0.6.8/StartBot.php on line 101
Could not open input file: /home/drlee/.beBot-0.6.8/Main.php
PHP Notice:  Undefined variable: pw in /home/drlee/.bebot-0.6.8/StartBot.php on line 101
Could not open input file: /home/drlee/.beBot-0.6.8/Main.php

the last error repeat in a loop and bot don't start :(

A pw file is supposed to be created in conf/ ? what is the syntaxe of this file pls, and it should contain the AOC pass ?

Much thanks for help
« Last Edit: February 07, 2011, 11:53:46 am by Eelwo »

Offline Getrix

  • Contributor
  • *******
  • Posts: 509
  • Karma: +0/-0
Re: StartBot.php won't work on Slackware
« Reply #6 on: February 07, 2011, 07:00:22 pm »
Quote
Could not open input file: /home/drlee/.beBot-0.6.8/Main.php
The error says that it can't open the file..

Why do you have a "." infront of the name of folder? Not sure, can be this that makes problems with some regex or something
Success is not final, failure is not fatal: it is the courage to continue that counts.
- Sorry, i dont have time to reply question on PM. Make a topic.

Offline Oolwe

  • BeBot User
  • **
  • Posts: 47
  • Karma: +0/-0
Re: StartBot.php won't work on Slackware
« Reply #7 on: February 07, 2011, 11:49:16 pm »
Hello,

hidden folder removed
Code: [Select]
drlee@shootox:~/bebot-0.6.8$ php -f StartBot.php Clan                                                                                                       
PHP Notice:  Undefined property: Conf::$cf in /home/drlee/bebot-0.6.8/Sources/Conf.php on line 70                                                           
PHP Notice:  Undefined variable: php_args in /home/drlee/bebot-0.6.8/StartBot.php on line 92                                                                 
Starting bebot with: /usr/bin/php /home/drlee/beBot-0.6.8/Main.php Clan                                                                                     
PHP Notice:  Undefined variable: pw in /home/drlee/bebot-0.6.8/StartBot.php on line 101                                                                     
Could not open input file: /home/drlee/beBot-0.6.8/Main.php                                                                                                 
PHP Notice:  Undefined variable: pw in /home/drlee/bebot-0.6.8/StartBot.php on line 101

same error :(


Offline Kentarii

  • BeBot Apprentice
  • ***
  • Posts: 153
  • Karma: +0/-0
    • AoC>TV
Re: StartBot.php won't work on Slackware
« Reply #8 on: February 08, 2011, 03:58:11 am »
What is output of:
Code: [Select]
ls -l /home/drlee/beBot-0.6.8/Main.php

Offline Oolwe

  • BeBot User
  • **
  • Posts: 47
  • Karma: +0/-0
Re: StartBot.php won't work on Slackware
« Reply #9 on: February 08, 2011, 08:44:27 am »
Hi,

i do everything with my user, and only try with root if i have to make install or some permission problems, error is exactly the same, very strange :/
Code: [Select]
-rw-r--r--  1 drlee drlee 12962 2011-01-31 15:54 Main.php

trying to start the bot with root give this
Code: [Select]
drlee@shootox:~/bebot-0.6.8$ su root
Password:
root@shootox:/home/drlee/bebot-0.6.8# php -f StartBot.php Clan
PHP Notice:  Undefined property: Conf::$cf in /home/drlee/bebot-0.6.8/Sources/Conf.php on line 70
PHP Notice:  Undefined variable: php_args in /home/drlee/bebot-0.6.8/StartBot.php on line 92
Starting bebot with: /usr/bin/php /home/drlee/beBot-0.6.8/Main.php Clan
PHP Notice:  Undefined variable: pw in /home/drlee/bebot-0.6.8/StartBot.php on line 101
Could not open input file: /home/drlee/beBot-0.6.8/Main.php
PHP Notice:  Undefined variable: pw in /home/drlee/bebot-0.6.8/StartBot.php on line 101
Could not open input file: /home/drlee/beBot-0.6.8/Main.php

php is from distribution install, i have attached the php.ini in previous post.

many many thanks for help

Offline Oolwe

  • BeBot User
  • **
  • Posts: 47
  • Karma: +0/-0
[SOLVED] Re: StartBot.php won't work on Slackware
« Reply #10 on: February 08, 2011, 11:07:54 am »
Hi,

StartBot.php work !!

Code: [Select]
drlee@shootox:~/bebot-0.6.8$ php StartBot.php Clan                                                                                           
PHP Notice:  Undefined property: Conf::$cf in /home/drlee/bebot-0.6.8/Sources/Conf.php on line 70                                           
PHP Notice:  Undefined variable: php_args in /home/drlee/bebot-0.6.8/StartBot.php on line 92                                                 
Starting bebot with: /usr/bin/php Main.php Clan                                                                                             
PHP Notice:  Undefined variable: pw in /home/drlee/bebot-0.6.8/StartBot.php on line 101                                                     
PHP Warning:  Call-time pass-by-reference has been deprecated in /home/drlee/bebot-0.6.8/Main.php on line 298                               

===================================================

    _/_/_/              _/_/_/                _/   

   _/    _/    _/_/    _/    _/    _/_/    _/_/_/_/

  _/_/_/    _/_/_/_/  _/_/_/    _/    _/    _/     

 _/    _/  _/        _/    _/  _/    _/    _/     

_/_/_/      _/_/_/  _/_/_/      _/_/        _/_/   

         An Anarchy Online Chat Automaton         

                     And                           

          An Age of Conan Chat Automaton           

         v.0.6.8 - PHP 5.2.10     

                 OS:                               

        Your operating system is detected as 32bit   

===================================================


probleme was in StartBot.php
Code: [Select]
$php_bin = trim(shell_exec('which php'));
//$php_args = " -c ./ ";
$main_php = "Main.php";

$main_php was  /home/drlee/bebot-0.6.8/Main.php & script don't start...

Many thanks to all

Getrix, for this time Slackware require less tweak than other distro ;) *joke*

note: for Slackware user, remember to comment this line in your StarBot.php

Code: [Select]
//$php_args = " -c ./ ";
« Last Edit: February 08, 2011, 11:11:24 am by Eelwo »

Offline Shelly

  • BeBot Apprentice
  • ***
  • Posts: 192
  • Karma: +0/-0
Re: [SOLVED] StartBot.php won't work on Slackware
« Reply #11 on: February 09, 2011, 01:45:30 am »
Good to see you got it working!

Congratulations!  8)

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 681
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal