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: PHP Error 0.4.2  (Read 9928 times)

0 Members and 1 Guest are viewing this topic.

Offline enfear

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
PHP Error 0.4.2
« on: October 14, 2007, 08:51:48 pm »
Hi there.

I was using the Bebot release v0.4.0 up until yesterday with no problems.
Then i decided to download the new release v0.4.2, after i unzipped and set it up i tried to run it but the bot only stays open for a few seconds (it never starts up). I also tried to update Mysql which did not help any.

Here is the error message which i found in "php_errors.txt".

[14-Oct-2007 20:03:31] PHP Warning:  mysql_connect(): Can't connect to MySQL server on '127.0.0.1' (10061) in D:\BeBot-v0.4.2\Sources\MySQL.php on line 96

Someone help please.
Thanks in advance

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: PHP Error 0.4.2
« Reply #1 on: October 14, 2007, 09:52:12 pm »
Are you using the old MySQL.conf?

For some reason php can't find your mysql server, not sure if the 10061 is the error number of the port number the bot tried to connect to.

Offline enfear

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: PHP Error 0.4.2
« Reply #2 on: October 15, 2007, 07:07:28 am »
I installed a totaly fresh copy of BeBot and set it up from scratch, i used the wiki as guide so i beleive i did it all correct.

I started the bot in debug mode and i'm getting alot of syntax error, i will post the screen output below.

I apologize if i'm "spaming" but i tried to upload a screenshot but file was too big.


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

         An Anarchy Online Chat Automaton

             v.0.4.2 - PHP 5.2.3

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

Connected to MySQL
MySQL error (# 0) on query: CREATE TABLE IF NOT EXISTS ?_security_groups
            (gid INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
            name VARCHAR(35) UNIQUE,
            description VARCHAR(80),
            access_level TINYINT UNSIGNED NOT NULL DEFAULT 0)
You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '?_security_groups
            (gid INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY ' at line 1
MySQL error (# 1) on query: INSERT IGNORE INTO ?_security_groups (name, descript
ion, access_level) VALUES ('superadmin', 'Super Administrators', 255),('admin',
'Administrators', 192),('leader', 'Raid Leaders', 128)
You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '?_security_groups (name,
description, access_level) VALUES ('superadmin', 'Super' at line 1
MySQL error (# 2) on query: CREATE TABLE IF NOT EXISTS ?_security_members
                (id INT UNIQUE NOT NULL AUTO_INCREMENT,
                name VARCHAR(50),
                gid INT,
                PRIMARY KEY (name, gid),
                KEY (id)
                )
You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '?_security_members
                (id INT UNIQUE NOT NULL AUTO_INCREMENT,
     ' at line 1
MySQL error (# 3) on query: CREATE TABLE IF NOT EXISTS ?_security_org
            (org_gov VARCHAR(255) NOT NULL,
            org_rank VARCHAR(255) NOT NULL,
            org_rank_id TINYINT UNSIGNED NOT NULL,
            access_level TINYINT UNSIGNED NOT NULL DEFAULT 2,
            PRIMARY KEY (org_gov, org_rank, org_rank_id))

You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '?_security_org
            (org_gov VARCHAR(255) NOT NULL,
            org_rank ' at line 1
MySQL error (# 4) on query: INSERT IGNORE INTO ?_security_org (org_gov, org_rank
, org_rank_id) VALUES ('Department', 'President', 0), ('Department', 'General',
1), ('Department', 'Squad Commander', 2), ('Department', 'Unit Commander', 3), (
'Department', 'Unit Leader', 4), ('Department', 'Unit Member', 5), ('Department'
, 'Applicant', 6), ('Faction', 'Director', 0), ('Faction', 'Board Member', 1), (
'Faction', 'Executive', 2), ('Faction', 'Member', 3), ('Faction', 'Applicant', 4
), ('Republic', 'President', 0), ('Republic', 'Advisor', 1), ('Republic', 'Veter
an', 2), ('Republic', 'Member', 3), ('Republic', 'Applicant', 4), ('Monarchy', '
Monarch', 0), ('Monarchy', 'Consil', 1), ('Monarchy', 'Follower', 2), ('Feudalis
m', 'Lord', 0), ('Feudalism', 'Knight', 1), ('Feudalism', 'Vassal', 2), ('Feudal
ism', 'Peasant', 3), ('Anarchism', 'Anarchist', 1)
You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '?_security_org (org_gov,
org_rank, org_rank_id) VALUES ('Department', 'President' at line 1

lubtehcookie [2007-10-15 05:03:42]      [CORE]  [LOAD]  Security.php
MySQL error (# 5) on query: CREATE TABLE IF NOT EXISTS ?_settings
              (module varchar(255) NOT NULL,
               setting varchar(255) NOT NULL,
               value varchar(255) NOT NULL,
               datatype varchar(255) DEFAULT NULL,
               longdesc varchar(255) DEFAULT NULL,
               defaultoptions varchar(255) DEFAULT NULL,
               hidden BOOLEAN DEFAULT 0,
               disporder INT UNSIGNED NOT NULL DEFAULT 1,
               PRIMARY KEY (module, setting))
You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '?_settings
              (module varchar(255) NOT NULL,
               setting v' at line 1
MySQL error (# 6) on query: SELECT value FROM ?_settings WHERE module = 'Setting
s' AND setting = 'SchemaVersion'
You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '?_settings WHERE module =
 'Settings' AND setting = 'SchemaVersion'' at line 1
MySQL error (# 7) on query: SELECT value FROM ?_settings WHERE module = 'Setting
s' AND setting = 'Schemaversion'
You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '?_settings WHERE module =
 'Settings' AND setting = 'Schemaversion'' at line 1
lubtehcookie [2007-10-15 05:03:42]      [SETTINGS]      [ERROR] Could not determ
ine version of the settings table. Quitting.
The bot has been shutdown
D:\BeBot-v0.4.2>pause
Press any key to continue . . .

I tried to change the command prefix to a "?", i'm not sure if that's part of the problem but i have changed it back to default again.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: PHP Error 0.4.2
« Reply #3 on: October 15, 2007, 10:52:28 am »
Seems like you set "?" as prefix for tables in the MySQL.conf somehow. Best just comment that variable out, you get botname as default prefix for tables then.

To use ? as command prefix you'll have to enter \? as command prefix in the Bot.conf I think.

Offline enfear

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: PHP Error 0.4.2
« Reply #4 on: October 15, 2007, 11:37:07 am »
Thanks for the assistance Alreadythere, i got it sorted out.

For some reason the new bot release wasn't happy with my MySQL database so i created one from scratch and the bot started up with no problems.

The previous version of BeBot i have installed is still quite happy with the old database though.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: PHP Error 0.4.2
« Reply #5 on: October 15, 2007, 12:16:57 pm »
There shouldn't be any problem with mysql versions on the bot side, everything from mysql 4.1.23 on (I think that's the version) should work. And that mysql version is years old now.

Still, nice to hear that it works now.

 

* 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: 105
  • 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