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

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

Author Topic: Running bot from DD-WRT enabled router  (Read 11137 times)

0 Members and 1 Guest are viewing this topic.

Offline risenlore

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Running bot from DD-WRT enabled router
« 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.

Offline risenlore

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Running bot from DD-WRT enabled router
« Reply #1 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.

Once you have that installed you will need putty and winscp
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
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

Just ignore them for now.
« Last Edit: February 22, 2012, 01:02:24 am by risenlore »

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


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


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

* Who's Online
  • Dot Guests: 127
  • 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