L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 12:58:21 AM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > Support for older versions > BeBot 0.3 support > Topic: MySql problem
Pages: [1]   Go Down
« previous next »
Print
Author Topic: MySql problem  (Read 1667 times)
0 Members and 1 Guest are viewing this topic.
captainwinky
Rookie
**
Offline Offline

Posts: 31


MySql problem
« on: May 27, 2006, 01:07:45 AM »

heya,
i hope this is the correct place for this query.
apon trying to run any BeBot newer than 0.2, i get

MySQL support required to run this bot

i am currently running 0.2.2 without any real problems, but would like to fiddle with newer versions to amuse myself in the wee hours of the morning :p

a little system info regarding mysql and php:

mysql  Ver 14.12 Distrib 5.0.21, for pc-linux-gnu (i486) using readline 5.1

PHP 5.1.2-1+b1 (cli) (built: Mar 20 2006 04:17:24)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

any pointers would be appreciated Smiley
Logged
Xenixa
BeBot Contributor
Expert
*******
Offline Offline

Posts: 307



Re: MySql problem
« Reply #1 on: May 27, 2006, 07:25:55 AM »

You need to ensure both the php_mysql(handles mysql functions) and libmysql(handles mysql connections) extentions are being loaded at runtime. Check the local php.ini for the bebot install.
Logged

<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky
captainwinky
Rookie
**
Offline Offline

Posts: 31


Re: MySql problem
« Reply #2 on: May 28, 2006, 10:06:11 PM »

had a little look at ../BeBot/php.ini
it seems to suggest the extensions section is for Windows.  is there also something that needs doing here on Linux?

also took a look at some of my system's php.ini files.  no mention of php_mysql or libmysql in them. 

sorry for my noobness, and all the questions that come as a result of it Smiley
Logged
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: MySql problem
« Reply #3 on: May 29, 2006, 09:54:15 PM »

Im heading to bed so i dont have the time to do much right now.

But this is the second time ive heard of the problem. The first person ended up downgrading without giving me a chance to try and diagnose the problem.

If you have a 0.2.2 working, its obvious that you have php with MySQL compiled in.
What i fail to understand offhand is why the following in main.php fails to detect the MySQL module being part of php:
Code:
if (!extension_loaded("mysql"))
{
if ($os_windows)
{
if (!dl("php_mysql.dll"))
{
die("Loading php_mysql.dll failed. MySQL extention required to run this bot");
}
}
else
{
die("MySQL support required to run this bot");
}

}

Has something changed on *nix when it comes to PHP and MySQL in 5.0/5.1 that im unaware of?

In any case, commenting out the die() statement in main.php should allow you to run newer versions for now.
Im wondering if this is a shell account though, and if it would be possible to obtain temporary access to it to do some testing.
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
captainwinky
Rookie
**
Offline Offline

Posts: 31


Re: MySql problem
« Reply #4 on: June 08, 2006, 09:19:29 AM »

Thanks Khalem.  I'll give that a try when I have a bit of spare time.
Regarding testing, I might be able to arrange that (assuming I have not misunderstood what you meant there).  I would need to speak to my network admin though to determin whether it's possible due to my being behind a bit of masquerading and such (and whether he would allow it) Smiley
Logged
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: MySql problem
« Reply #5 on: June 08, 2006, 09:28:30 AM »

maybe use function_exists("mysql_connect") instead to check whether it's loaded?
Logged
senare
Freshman
*
Offline Offline

Posts: 5


Re: MySql problem
« Reply #6 on: July 10, 2006, 06:11:02 AM »

hum dont know if this is related but however ... if ppl are running Ubuntu linux wich i belive is quite popular nowdays Smiley do be aware that there are a bug in the php4_mysql. (double check that the package is there with the php -m ) it might not install properly from apt-get.

/chowkow

PS u will get the

"Fatal error: Call to undefined function mysql_connect() in /home/samba/Bebot/BeB                                                                             ot_v0.2.8/MySQL.php on line 63"
fix it with
"sudo dpkg-reconfigure php5-mysql"
or similar  DS
« Last Edit: August 27, 2006, 04:45:18 AM by senare » Logged
paal
Freshman
*
Offline Offline

Posts: 2


Ubuntu linux
« Reply #7 on: October 16, 2006, 09:33:45 PM »

Seems like Ubuntu has the php configured so it uses the php.ini file that exists in the bebot dir instead of the cli one.
was stuck for a few hours before i finaly figured it.
moving / deleteing the file fixed my problem and i could continue to the "AOChat: not expecting login." one Shocked
Logged
Malosar
Expert
*****
Offline Offline

Posts: 259


WWW
Re: MySql problem
« Reply #8 on: October 17, 2006, 07:14:27 AM »

php will always use local php.ini settings and resort to global settings for everything else, unless specified otherwise.

Good luck with the "not expecting login" problem  Tongue
Logged

Eternalist
General of The Syndicate
lulifuz
Rookie
**
Offline Offline

Posts: 32


Re: MySql problem
« Reply #9 on: August 24, 2007, 01:29:20 PM »

Hi there,

I am trying to upgrade from Bebot 0.2.x to 0.4.x.
I thought the most difficult part would be the conversion of the database.
But now I don't even get the Bot running.
First I was getting the
'MySQL support required to run this bot'
message, so i commented the die() statement out as Khalem suggested.
Ok, but then I get to the error:
'Fatal error: Call to undefined function mysql_connect() in /home...'
as senare describes.
Quite crazy, as version 0.2.x is running and using this also.
I have a Ubuntu installation and the cli version of php 4.4.something running.

Any Ideas?

Regards,

 lulifuz
Logged
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1085


Re: MySql problem
« Reply #10 on: August 24, 2007, 01:44:21 PM »

Try adding extension=mysql.so to your php.ini.
Logged
Temar
BeBot Developer
Grandmaster
********
Offline Offline

Gender: Male
Posts: 877



WWW
Re: MySql problem
« Reply #11 on: August 24, 2007, 07:42:43 PM »

i changed my startbot.php i think i had same error

Code:
{
/*
This is a sane default for the php binary on Unix systems.
If your php binary is located someplace else, edit the php_bin path accordingly.
*/
// $php_bin = trim(shell_exec('which php'));
// $php_args = " -c ./ ";
$php_bin = "/usr/bin/php";
$main_php = "Main.php";
}
Logged

MSN messenger: chris_smith96 at hotmain dot com
Xfire: chriss96
lulifuz
Rookie
**
Offline Offline

Posts: 32


Re: MySql problem
« Reply #12 on: August 25, 2007, 03:31:33 AM »

Hi again,

thanks to both of you.
The line extension=mysql.so in the php.ini was alreadythere Alreadythere ;-)

So I tried what Temar suggested and that worked.
As I am a curious guy I tried to comment only the line:
//$php_args = " -c ./ ";
and this worked also.
This arg lets php look for the .ini file in directory ./.
Strange, as I have renamed the .ini file in the Bebot dir.

Anyway, now it works and I am happy.

Regards,

 lulifuz
Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > Support for older versions > BeBot 0.3 support > Topic: MySql problem
« previous next »
 
Jump to:  

Recent
[request] Raid timers
by Elesar1
[December 01, 2008, 04:41:09 PM]

Shared DB online list
by Temar
[December 01, 2008, 01:55:47 AM]

relay colors
by Temar
[December 01, 2008, 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]

Bot not see Guild Chat
by Delvar
[November 28, 2008, 08:30:34 AM]

Starting Bot
by Allisande
[November 28, 2008, 07:08:21 AM]
Stats
Members
Total Members: 1243
Latest: Whackoeng
Stats
Total Posts: 11144
Total Topics: 1505
Online Today: 21
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 0
Guests: 17
Total: 17

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.192 seconds with 30 queries. (Pretty URLs adds 0.029s, 4q)
Loading...