BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => AoC 0.6 support => Topic started by: tubbyschaef on November 18, 2009, 12:00:35 am

Title: Socket extension req
Post by: tubbyschaef on November 18, 2009, 12:00:35 am
Im totaly new to the bebot/php/mysql thing.  I think i was able to set things up.  But then again im in the forms asking for help so prob not.  When i click the StartBot, windows batch file (in the folder that contains the bebot and PHP) it goes to a cmd window and trys to load thebot...it says loading php_sockets.dll. failed.  Socket extensions required to run this bot. 

it cycles this over and over until i close the cmd window.

I have downloaded and instaleld "php-5.2.11-win32-installer" and "BeBot-0.6.6" in to a created folder "bebot" on c:\

I further instaled "mysql-5.1.40-winx64"

Any help would be great.  Im sure im missing something simple.

Tubby
Title: Re: Socket extension req
Post by: tubbyschaef on November 18, 2009, 04:31:08 pm
I did some further research and serfing the web and I think i fixed the probelm.  I reinstaled php and selected sockets seemed to fix the above errors.

But now i have a new problem.

I attempt to start the bot vie the startbot and the main screen comes up again but i get the following messege...

"unable to select database guilddb database not found or insufficent priviledges!  Access denied for usser 'tubbyschaef '@' localhost' to database 'guilddb'

mysql config settings are as follows

<?php
   /*
   Database name
   */
   $dbase = "guilddb";

   /*
   Database username
   */
   $user = "tubbyschaef";

   /*
   Database password
   */
   $pass = "ironside";

   /*
   Database server (usually localhost)
   */
   $server = "localhost";

   /*


And these are the steps i used to set up the database via the cmd window:

1.   Type CREATE DATABASE databasename CHARACTER SET latin1; (replace
        databasename with the name of the database you wish to create)
2.   Press Enter/Return.
3.   CREATE USER username@localhost; (Change username to the username you
        want, keep @localhost)
4.   Press Enter/Return.
5.   SET PASSWORD FOR username@localhost = PASSWORD(’newpassword’);
        (Change username and newpassword to your selected username and
        password, again keep @localhost)
6.   Press Enter/Return.
7.   Type GRANT ALL on databasename.* TO username@localhost; (Again,
        change username, keep @localhost)
8.   Press Enter/Return.
9.   Type quit then Enter/Return to exit the MySQL Monitor.


any sugjestions will greatly be appreciated...
I used word pad for the text edditing...
Title: Re: Socket extension req
Post by: Shelly on December 01, 2009, 03:31:27 am
You might want to get the MySQL tools to check your user permissions to the database. Sounds like either MySQL is not running on the localhost or the MySQL did not get installed correctly.
Title: Re: Socket extension req
Post by: tubbyschaef on December 14, 2009, 04:03:39 am
I finally got it to work, in cmd prompt i just typed php startbot.php and that did it
 

Thanks
TB
Title: Re: Socket extension req
Post by: fowlskins on December 28, 2009, 09:44:13 pm
im having the same trouble as this post
ive reinstalled a few times but i always get this message when the bot starts up


===================================================

    _/_/_/              _/_/_/                _/

   _/    _/    _/_/    _/    _/    _/_/    _/_/_/_/

  _/_/_/    _/_/_/_/  _/_/_/    _/    _/    _/

 _/    _/  _/        _/    _/  _/    _/    _/

_/_/_/      _/_/_/  _/_/_/      _/_/        _/_/

         An Anarchy Online Chat Automaton

                     And

          An Age of Conan Chat Automaton

         v.0.6.6 - PHP 5.3.1

                 OS: Windows_NT

        Your operating system is detected as 32bit

===================================================


Warning: dl(): Unable to load dynamic library 'C:\php5\php_sockets.dll' - The sp
ecified module could not be found.
 in C:\Documents and Settings\steve\My Documents\bebot\Main.php on line 127
Loading php_sockets.dll failed. Sockets extention required to run this bot
C:\Documents and Settings\steve\My Documents\bebot>pause
Press any key to continue . . .

any help would be appriciated :)
Title: Re: Socket extension req
Post by: Shelly on December 30, 2009, 04:33:16 am
Try moving your bot home it from your "My Documents" folder to "C:\BeBot" or some such short name with no spaces in it. Then open a command prompt "Start-->run-->cmd" then "cd \BeBot" and then php startbot.php.

Not sure if this will help, but it is something to try.
Title: Re: Socket extension req
Post by: WeZoN on December 30, 2009, 06:04:00 am
no no no!!!


the reason for it not findind the "php_sockets.dll" is because that file is not in the php5 directory,,
i also believe that it will ask for "php_mysql.dll"

so here are both those files.   (it's a zip files)
Put them in the php5 directory


http://www.cero89.com/downloads/php.zip
Title: Re: Socket extension req
Post by: fowlskins on January 02, 2010, 12:10:56 am
well ive managed to sort out one problem only to be baffled by the next
i know have the same problem as the post above only i cant start it with start.php command

it seems to be a problem with mysql ive reinstalled mysql and php a few times and ive also tryed many times reconfiging the mysql.conf and creating new databases and passwords but every time i seem to be blocked from logging on and get this message


===================================================

    _/_/_/              _/_/_/                _/

   _/    _/    _/_/    _/    _/    _/_/    _/_/_/_/

  _/_/_/    _/_/_/_/  _/_/_/    _/    _/    _/

 _/    _/  _/        _/    _/  _/    _/    _/

_/_/_/      _/_/_/  _/_/_/      _/_/        _/_/

         An Anarchy Online Chat Automaton

                     And

          An Age of Conan Chat Automaton

         v.0.6.6 - PHP 5.2.6

                 OS: Windows_NT

        Your operating system is detected as 32bit

===================================================

Curl not available
MySQL ERROR(# 1) on query: Unable to select database wolf Database not found or
insufficient priviledges!
Access denied for user 'bot'@'localhost' to database 'wolf'
C:\bebot>pause
Press any key to continue . . .
Title: Re: Socket extension req
Post by: Getrix on January 02, 2010, 12:27:47 pm
* Startup 'cmd' via Start->Run
* Go into your mysql bin folder "cd x:/MySQL folder/bin"
* Type: mysql.exe -h 127.0.0.1 -u USER -p
You could also try "localhost" and even the local IP (192.168.x.x/10.x.x.x)

If this isnt working, there is something wrong with your MySQL server setup..
Title: Re: Socket extension req
Post by: fowlskins on January 02, 2010, 03:14:03 pm
ok when i did what you said in command promt using my username and password
it came back with this

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\steve>cd \

C:\> mysql.exe -h 127.0.0.1 -u bot -p
Enter password: ****
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 5.1.39-ndb-7.0.9-cluster-gpl MySQL Cluster Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

it seems to reconise the password here but when i start up the bot it has permissions issues
Title: Re: Socket extension req
Post by: Getrix on January 02, 2010, 03:27:52 pm
Ok, you are able to connect to mysql.
Then we can do more testing

At "mysql >" you type following:

mysql> show databases;  // Will show databases in your server
mysql> use database;      // Select your database if it shows up
mysql> show tables;  // Will show tables in your selected database
mysql> SELECT * FROM whois; // Trying to query the database table "whois"

Try this step by step and report where it fails.

EDIT: Even try to connect mysql.exe with "localhost" and not "127.0.0.1" to check if that fails in cmd..
Title: Re: Socket extension req
Post by: fowlskins on January 02, 2010, 04:07:05 pm
mysql>  show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| databasename       |
+--------------------+
2 rows in set (0.19 sec)

mysql> use database;
ERROR 1044 (42000): Access denied for user 'bot'@'localhost' to database 'databa
se'
mysql> show tables
    -> show tables;
ERROR 1046 (3D000): No database selected
mysql> SELECT * FROM whois;
ERROR 1046 (3D000): No database selected
mysql>

seems like it failed trying to select a database

also using local host  didnt help either

C:\>mysql.exe -h "localhost" -u bot -p
Access is denied.

C:\>mysql.exe -h localhost -u bot -p
Access is denied.

thanks for your on going advise by the way its doing my head in we had a bot in guild before but the owner has left the game
there dead usefull but i didnt know it would be this much of a headache  :D
Title: Re: Socket extension req
Post by: Getrix on January 02, 2010, 04:51:35 pm
Ok, you havent setup mysql database correct...

Do this in "mysql>" promt:

mysql> create database db_aocbot;
mysql> grant all privileges on db_aocbot.* to 'usr_aocbot'@'127.0.0.1' identified by 'PASSWORD';  // Change PASSWORD
mysql> grant all privileges on db_aocbot.* to 'usr_aocbot'@'localhost' identified by 'PASSWORD';  // Change PASSWORD

Then edit your Botfolder/conf/Botname.MySQL.conf
$dbase = "db_aocbot";
$user = "usr_aocbot";
$pass = "PASSWORD";   // Change PASSWORD
$server = "127.0.0.1";

And try start it
If not working, i suggest you to start all over again with the installation guide. Because you havent done what you are supposed todo correct...

Title: Re: Socket extension req
Post by: fowlskins on January 02, 2010, 05:14:41 pm
that seems to have sorted it
thanks for your time and patience
SimplePortal 2.3.7 © 2008-2024, SimplePortal