BeBot - An Anarchy Online and Age Of Conan chat automaton

Age of Conan => AoC 0.6 support => Topic started by: Kepha on September 11, 2016, 02:12:10 pm

Title: Line 99 StartBot.php
Post by: Kepha on September 11, 2016, 02:12:10 pm
Changing the whole post.

Anyone running the bot on Linux with LAMP installed?

I am encountering the follow error when launching the bot which is related to Line 99 on StartBot.php
Quote
MySQL support required to run this bot

What is happening at this point. Is it related to the *.ini and Main.php files path or the Database?
Title: Re: Line 99 StartBot.php
Post by: Khalem on September 22, 2016, 10:01:08 pm
Which distribution and release are you running?

The bot is failing to load the mysql php module which it needs to operate.
Title: Re: Line 99 StartBot.php
Post by: Kepha on September 24, 2016, 01:46:50 am
Thank you for the reply Khalem.

Ubuntu Gnone 16.04 LTS.

I just installed XAMPP 5.6 as opposed to LAMP since the latter is optimized for PHP 7.
I am hoping that my problem was passing through the PHP version and the bot code.

- when trying to "php StartBot.php" I get that the program php is currently not installed and suggests me to install php7.0-cli
- when trying "php5 StartBot.php" I get a similar message to also install php7.0-cli

Any suggestions?
Title: Re: Line 99 StartBot.php
Post by: Khalem on October 06, 2016, 08:49:30 pm
The reason you are running into issues is because XAMPP installs itself into /opt which is outside the default path.

As such, you will need to specify the full path to the executeable, although you are likely to run into other issues as well since php support libraries won't be in the default path either.

However, given that XAMPP installs itself in such a way, you should probably not have any issues having the OS supplied php packages installed at the same time.
f.ex:
apt install php5 php5-mysql

I have not had a chance to test php7 yet, however the latest git snapshot should likely work.
Title: Re: Line 99 StartBot.php
Post by: Kepha on October 14, 2016, 12:22:11 am
Right.

I installed LAMP with PHP5.

I have placed the bebot folder under /var/www/html/ and tried to start the bot with "php5 start.php"(I have php and php5 listed)

On the first time it said "Could not open input file: start.php", to install php5 -cli, which I did; tried to repeat the command and now I only get the same message "Could not open input file: start.php".

Am I one step closer?
Title: Re: Line 99 StartBot.php
Post by: Khalem on October 16, 2016, 01:38:15 pm
A few things to note.

The bot does not need to (and should not) be placed in directory accessible by web.
The bot should also not be run by the root user or any other privileged user.

The is a documentation error, due to files being renamed, the appropriate filename is
StartBot.php
Title: Re: Line 99 StartBot.php
Post by: Kepha on October 17, 2016, 10:37:57 am
Silly me.

I did try StartBot.php but was getting more errors which made me ignore it. After not doing it, I found out that I am using an old version of files which require a lot of code/line changing due to the php version. I replaced a few files and end up here,

Quote
BOT [MOD]        [DIR]   Loading modules

Fatal error: Cannot redeclare class ModuleControlGUI in /********/bebot/modules/ModulesControlUI.php on line 144

Problem solved.  :o

Made a new installation with the bebot master.zip I found in a different thread and all is good. Good timing as well, holidays are over, I will need to repeat all of this again later on.

Thank you Khalem  ;)