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: linux (slackware) and bebot  (Read 3523 times)

0 Members and 1 Guest are viewing this topic.

Offline Metaphblade

  • BeBot User
  • **
  • Posts: 49
  • Karma: +0/-0
linux (slackware) and bebot
« on: January 28, 2008, 07:05:58 am »
For about a week now, i have been trying to setup a bot on my new slackware box.  i have been VERY unsucessful.  I can actually start the scripts, however, i dont get very far into it, and i get errors, and the bot shuts down.

When running Main.php (this is what startdebug.bat runs, so i ran it so it didnt loop), i get the following error.

Code: [Select]
?>PHP Notice:  Undefined variable: log_path in /orbbot/Main.php on line 144
PHP Notice:  Undefined variable: bot_name in /orbbot/Main.php on line 144
PHP Notice:  Undefined variable: dimension in /orbbot/Main.php on line 144
PHP Notice:  Undefined variable: bot_name in /orbbot/Main.php on line 151
MySQL database connection test successfull
PHP Notice:  Undefined property:  MySQL::$close in /orbbot/Sources/MySQL.php on line 188
PHP Fatal error:  Class 'AOChat' not found in /orbbot/Main.php on line 152
root@bladeslinux:/orbbot# php StartBot.php
PHP Notice:  Undefined offset:  1 in /orbbot/StartBot.php on line 74

any ideas on this one?

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: linux (slackware) and bebot
« Reply #1 on: January 28, 2008, 12:29:18 pm »
One thing first: you shouldn't run the bot as root, create a different user and use that to run the bots. Much saver.

The first couple of notices all point to one common problem. The variables of the Bot.conf aren't set, looks like the bot cannot open it. Or maybe they are commented out somehow?

The fatal error about AOChat points in a similar direction, for some reason php cannot create the AOChat instance. Either an error in the file or a problem of accessing the right file. Are all rights to the files correct? Perhaps you have to retry with a new clean download of the bot. The MySQL error could be something similar.

The notice you get as you call StartBot.php can be ignored. I'll add a check to remove that in the next version.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: linux (slackware) and bebot
« Reply #2 on: January 28, 2008, 05:56:35 pm »
Extract your bot to a directory...

cd into the directory cd /home/user/mybebot

run php StartBot.php

Everything should start fine if php has all the required php modules.

Offline Metaphblade

  • BeBot User
  • **
  • Posts: 49
  • Karma: +0/-0
Re: linux (slackware) and bebot
« Reply #3 on: January 28, 2008, 10:55:59 pm »
Extract your bot to a directory...

cd into the directory cd /home/user/mybebot

run php StartBot.php

Everything should start fine if php has all the required php modules.

This is actually how i am running the bot.
cd botname
php Main.php

errors pop up


Had schoold today, and rest of the week, and work all week, so i probably wont be able to mess with this much more till friday night. 

Offline Metaphblade

  • BeBot User
  • **
  • Posts: 49
  • Karma: +0/-0
Re: linux (slackware) and bebot
« Reply #4 on: February 06, 2008, 08:44:01 am »
well....i got the bot to run with Main.php.  only a few hiccups, few commands such as !is, and a few others weren't working.  ill troubleshoot those later.  my main concern is, when i start the bot with

php Startbot.php
i get an error message saying that this bot needs mysql to run, however, when i run
php Main.php
it access the mysql database just fine.

any thoughts on this?

****edit****
this is also on a current download of the SVN.  all commands and regular start works fine using this version on my winblows box.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: linux (slackware) and bebot
« Reply #5 on: February 06, 2008, 11:28:36 am »
Sounds like the php.ini in the bot root directory doesn't load the mysql plugin in your config. Make sure it loads the mysql module.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: linux (slackware) and bebot
« Reply #6 on: February 06, 2008, 05:20:26 pm »
My experience on Linux systems is it's best to nuke the php.ini distributed with BeBot. :)

Offline Tichy

  • BeBot User
  • **
  • Posts: 42
  • Karma: +0/-0
Re: linux (slackware) and bebot
« Reply #7 on: February 09, 2008, 12:25:16 pm »
The php.ini shipped with BeBot specifies a new extension path. This will never work on linux systems using prebuild packages. Just comment the line in BeBot's php.ini:

Code: [Select]
; Mainly for windows where additional modules are always required
;extension_dir = ./php_extension/


Offline Metaphblade

  • BeBot User
  • **
  • Posts: 49
  • Karma: +0/-0
Re: linux (slackware) and bebot
« Reply #8 on: February 17, 2008, 09:46:24 pm »
The php.ini shipped with BeBot specifies a new extension path. This will never work on linux systems using prebuild packages. Just comment the line in BeBot's php.ini:

Code: [Select]
; Mainly for windows where additional modules are always required
;extension_dir = ./php_extension/



well....i commented that, then added php.ini to the bot (was using the one with linux), uncommented extension=mysql.so.  now i dont get the sql error, but i get another error.

Code: [Select]
AOChat class needs the BCMath extension to work.
PHP Notice:  Undefined offset:  1 in /orbbot/StartBot.php on line 75

this is what is in that area of code.

Code: [Select]
line 74 $last_line = system($php_bin . $php_args . " " . $main_php . " " . $argv[1]);

line 76     if (preg_match("/^The bot has been shutdown/i", $last_line))

there is no code on line 75

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: linux (slackware) and bebot
« Reply #9 on: February 17, 2008, 10:09:14 pm »
bcmath is default in any php config I think.

And the notice is due to the argv[1], it's most likely not set. Adding a check for parameters is on my todo list ;)

Offline porter

  • BeBot User
  • **
  • Posts: 28
  • Karma: +0/-0
Re: linux (slackware) and bebot
« Reply #10 on: February 18, 2008, 09:30:29 pm »
bcmath is default in any php config I think.

Not true. Before compiling PHP you need to remember to configure it with --enable-bcmath - it is entirely possible that the PHP version the original poster has does not include BCMath. I have not used Slackware in, uhh, don't know, this century at least, so not sure how they package PHP or anything but if you did not compile PHP yourself you might want to check if they have additional extensions for PHP available.

[edit] To clarify the above, PHP source includes BC Math since 4.04 or so but different binary distributions may not have it compiled in. Apparently it is always compiled in Window$ versions.
« Last Edit: February 18, 2008, 09:33:36 pm by porter »

 

* 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: 670
  • 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