BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => AO 0.6 support => Topic started by: taconis on July 02, 2011, 09:06:55 pm

Title: Undefined variable: pw in startbot.php line 100
Post by: taconis on July 02, 2011, 09:06:55 pm
XP ... MySQL 5.0.2 ... PHP 5.2.6 ... 0.6.8 BeBot ...

I created the db, created the user, set the rights (global) to the db within MySQL (manual commands).  I then start up the bot using C:\BeBot\TNTB1\php.exe startbot.php.  Initially it asks for all the logins, db names, passwords and does the config.  BeBot gives the following error when trying to actually run the bot.:

Curl not available
MySQL ERROR(# 1) on query: Unable to select database tntb1 Database not found or insufficient priviledges!
Access denied for user 'tntb1'@'%' to database 'tntb1'PHP Notice:  Undefined variable: pw in C:\BeBot\TNTB1\StartBot.php on line 100

I've double checked the bot.conf and the mysql.conf and both are good.
Title: Re: Undefined variable: pw in startbot.php line 100
Post by: kenny on July 02, 2011, 09:34:52 pm
Are you sure you have a password entered? The message says your "pw" variable is empty.
Title: Re: Undefined variable: pw in startbot.php line 100
Post by: taconis on July 03, 2011, 01:26:11 am
The passwords are set in the bot and mysql config files.
Title: Re: Undefined variable: pw in startbot.php line 100
Post by: taconis on July 03, 2011, 01:27:15 am
I did notice the variable name in bot.conf is pwd and not pw.  Think that might be the problem?
Title: Re: Undefined variable: pw in startbot.php line 100
Post by: uberjon on July 03, 2011, 07:58:47 am
the variable for /conf/bot.conf should be this stuff here:
Code: [Select]
  /*
    These are the general settings of the bot:
  */

  $ao_username = "";               // Account username
  $ao_password = "";               // Account password (optional, will request on running of Bot if not entered here)
  $bot_name = "";                  // Name of the bot-character
  $dimension = "";                 // The name of the server you play on, or (1, 2 or 3 for AO)
  $guild = "";                     // Name of the guild running the bot (AOC only)
Title: Re: Undefined variable: pw in startbot.php line 100
Post by: taconis on July 03, 2011, 03:03:22 pm
So I stripped the grant rights, dropped the user, dropped the database, created the db, created the user, granted the user to everything (5.0.2 didn't like botdbname*.* and I had to drop the single quotes around user name, and totally dropped the @ localhost).  It now loads all the modules, but then comes up with...

Fatal error: Cannot redeclare class BotStatisticsUI in C:\BeBot\TNTB1\modules\ao\BotStatisticsUI.php on line 89
PHP Notice:  Undefined variable: pw in C:\BeBot\TNTB1\StartBot.php on line 100

I went back into mysql and confirmed the user has the correct access to the db and all related tables.  I still cannot figure out why the pw is showing undefined in startbot when all the passwords are correct in bot.conf and mysql.conf.
Title: Re: Undefined variable: pw in startbot.php line 100
Post by: Shelly on July 08, 2011, 01:37:04 am
This is benign.

What I did on my bots was in the StartBot.php file on line 38 is just make a declaration

$pw = NULL;

This cleared the annoying message. :)

As for your other errors... check that your php.ini file is correct (from the setup wiki). Then if that is correct... you might have file permission problem. try making sure that you are the owner all the files in your bot directory.
SimplePortal 2.3.7 © 2008-2024, SimplePortal