BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => AO 0.6 support => Topic started by: spypower on August 20, 2009, 12:37:58 am
-
Hi there, n thanks for reading my post.
In the past 10 hours i'm trying to setup a debian system for my bot. Well, since it was my first touch with a unix system, i had problems on the wlan0 iface etc etc. After all the hardware probs, after installing (i think) the MySql server, instlaling the php5.2, unzipping the files to a folder on the debian server.. i have a lil problem running the bot right now.
Fatal error: require_once(): Failed opening required './Sources/Conf.php' (include_path='.:/usr/share/php:/usr/share/pear') in /bot/StartBot.php on line 73
The file is there, but still have no idea what to check.
Hope someone knows what's going on.
-
Solved by Malaxia
[Malaxia]: now type "ls -l Conf.php"
Um, another question if its possible, is there a way to copy the members from my bot i had on windows to this bot on the unix? Which files should i look at?
-
If you had same bot version on your windows and on your linux I guess you could just copy the folder named after your bot database. Never did this but it should work I think.
Under windows you'll find the folder in mysql/data. Under linux it's in /var/lib/mysql.
If it doesn't work easiest solution would be to export the table(s) you want in a sql file.
-
You will need to dump the database on your windows system and import it on your linux system using mysql_dump or another MySQL tool like SQLYog.
There is a post somewhere describing the process but i don't have time to search for it atm.
-
Solved by Malaxia
[Malaxia]: now type "ls -l Conf.php"
Um, another question if its possible, is there a way to copy the members from my bot i had on windows to this bot on the unix? Which files should i look at?
How did you actually solve it? Typing "ls -l Conf.php" did no magic at my webhost. Thing is that i know what the problem is but i have no clue how to work with it, if i hardcode all paths into bebot it seems like it will do its job but hey, i dont want to recode all "pathed" settings into bebot.
as now most paths are relative e.g: "./Conf/Bot.conf" but if i hardcode "/home/username/Bebot/conf/Bot.conf" itl go onto next file with basicly same error "not found". And with all these files id rather like to see a solution to it.
-
Sounds like an issue with your webhost, not BeBot. I have no problem running multiple bots under Linux.
You are trying to run BeBot as a PHP script, not a webpage correct:
WRONG: http://server.hostname.com/path/StartBot.php
RIGHT: php StartBot.php
-
I'm afraid there is no real solution to your issue Dochere if i have understood your posts correctly as you are running the bot outside a supported enviroment.
You are running the bot from a webhost, and presumeably launching it from a webserver?
In any case you are running the bot in a way that is not supported nor recommended. And i am very suprised that your hosting company is allowing you to run a background process on a webserver at all.
That said, it's probably possible to force the working directory using the php chdir() function.
See http://no2.php.net/manual/en/function.chdir.php
But again, from what i can tell your operating enviroment is not supported and very heavily discouraged.
And please do not contact us if someone on said webserver compromises your AO Account or the likes due to running the bot in an insecure enviroment.
-
found a working solution!!!
/usr/bin/php /home/username/botdir/StartBot.php > /dev/null &
and mysql_pconnect was also needed to do this. Running on a Hostgator webserver. a little singleton script makes sure my cron job not restart and starts new instaces of the bot (iwe got cron set to every hour incase anything were to happend).
-
Ahh, glad to have that cleared up. I misinterpreted the way you ran the bot :)
Not sure why you needed to use pconnect as it is discouraged for most usage cases. But given the enviroment you run in, MySQL/PHP settings could be tweaked in a way that does not play too nice with BeBot.
On an somewhat unrelated sidenote, does your webhost really run PHP on their webservers with sockets enabled? :o
-
Hehe no they dont, i made like 10 support tickets and since iwe been a customer for a few years, and they were allowed to see through what i were doing it was ok :)
-
On an somewhat unrelated sidenote, does your webhost really run PHP on their webservers with sockets enabled? :o
It is possible to run the Apache PHP module along side the command line PHP interpreter with different configuration files. On my Linux machines, the Apache PHP module deals with any PHP web apps, and command line stuff is dealt with my invoking PHP directly.
Debian and Ubuntu have PHP split up into three parts:
- php5-cli: PHP5 command line interpreter.
- php5-cgi: For Apache2 with mod_actions or any other CGI httpd that supports similar mechanism.
- libapache2-mod-php5: PHP5 module for the Apache 2 webserver.
Each has it's own configuration file. In general, you would have libapache2-mod-php5 and php5-cli installed.
php5-cgi and libapache2-mod-php5 are complied with sockets disabled, but php5-cli has sockets enabled as it's intended for command line use.
Perhaps Dochere's host has a similar configuration, or he got lucky with the support team. :)