BeBot - An Anarchy Online and Age Of Conan chat automaton
General => Feedback and Suggestions => Topic started by: risenlore on February 20, 2012, 07:20:13 am
Title: Running bot from DD-WRT enabled router
Post by: risenlore on February 20, 2012, 07:20:13 am
8) I finally got bebot running from optware. I am still getting errors but the bot connects and logs in. $argv[1] functions in conf.php are throwing errors. I had to comment utf-8 decode support in bot.php and comment Group message in main.php. It's a work in progress. The errors are on the optware side if anyone has input.
Title: Re: Running bot from DD-WRT enabled router
Post by: risenlore on February 20, 2012, 09:21:58 am
I have everything working now except the argv variables.
Here is a quick tutorial for anyone interested. You will need to install Optware the right way by Frater http://www.dd-wrt.com/wiki/index.php/Optware,_the_Right_Way (http://www.dd-wrt.com/wiki/index.php/Optware,_the_Right_Way).
Once you have that installed you will need putty and winscp http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) http://winscp.net/eng/download.php (http://winscp.net/eng/download.php)
Open your bebot Main.php file and edit
line 127 if (!dl("php_sockets.dll")) line 143 if (!dl("php_mysql.dll")) line 160 if (@!dl("php_curl.dll"))
to
line 127 if (!dl("sockets.so")) line 143 if (!dl("mysql.so")) line 160 if (@!dl("curl.so"))
Open putty when it asks for your login username is 'root' password is what your router password is set to.
from the command line issue the following ipkg install exif libexif php-curl php-fcgi php-mbstring php-mysql php-xmlrpc xmlrpc
Those packages should now be installed next set up your mysql server Start the server with cd /opt/bin mysqld_safe &
press enter then set your password by using mysqladmin -u root password 'new-password'
Bring yourself back to the root directory and start your mysql configuration cd / mysql -p 'password' CREATE 'databasename' GRANT ALL on 'databasename.* TO 'newuser'@localhost IDENTIFIED BY 'password' USE 'databasename'
Leave putty open and connect to your router with winscp. You may need to set up a ssh key private/public to connect. Once your connection is established open the opt directory seen from the root directory. Drag and Drop your bebot folder in opt. From opt navigate to /etc/php.d. Once here you will need to make a few ini files then open your ini files and on the first line type extension='nameofini'.so BCMath.in extension=bcmath.so curl.ini extension=curl.so exif.ini extension=exif.so mbstring.ini etc mysql.ini etc sockets.ini xml.ini xmlreader.ini xmlrpc.ini
Navigate to /opt/etc and edit the php.ini file. change register_argc_argv = Off to register_argc_argv = On make sure safe mode is set to off safe_mode = Off
Now in putty your bot should load with the following commands cd /opt/'nameofbotfolder' php StartBot.php
If your get eof errors on the bot login let it run until it connects. Also I am getting errors line 47 line 70 /Source/Bot.php line 73 line 100 /Main.php