Fatal error:Call to undefined function mysql_get_client_info

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kingdomfan
Forum Newbie
Posts: 2
Joined: Fri Mar 18, 2005 10:51 am

Fatal error:Call to undefined function mysql_get_client_info

Post by kingdomfan »

Hi all,
I seem to have a problem when i try to run my script.
I'm running
Win XP Pro.
PHP 5.0.3
MySQL 4.1.10
IIS

I have read that this error is know in earlier versions of PHP but i don't know why i'm getting it.
Fatal error: Call to undefined function mysql_get_client_info() in c:\Inetpub\wwwroot\******\****.php on line 6.

I'd appreciate it if anybody has a solution to my problem

Many Thanks,
Kieran.
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post by infolock »

please post your code.
kingdomfan
Forum Newbie
Posts: 2
Joined: Fri Mar 18, 2005 10:51 am

Post by kingdomfan »

here is the code.....

Code: Select all

<?php

// try to get config info

print "Checking MySQL Library Version, this must be >= 3.23.47<br><br>";
print "Your MySQL Library Version: ".mysql_get_client_info()."<br><br>";

print "Checking MySQL Server Version, this must be >= 4.x<br>
print "Your MySQL Server Version: ".mysql_get_server_info()."<br><br>";

print "Checking PHP Version, this must be >= 4.3<br>
print "Your PHP Version: ".PHP_VERSION."<br><br><br>";

?>
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post by infolock »

kingdomfan wrote:here is the code.....

Code: Select all

<?php

// try to get config info

print "Checking MySQL Library Version, this must be >= 3.23.47<br><br>";
print "Your MySQL Library Version: ".mysql_get_client_info()."<br><br>";

print "Checking MySQL Server Version, this must be >= 4.x<br>
print "Your MySQL Server Version: ".@mysql_get_server_info()."<br><br>";

print "Checking PHP Version, this must be >= 4.3<br>
CaLogic was programed with PHP Version 4.3.2<br><br>";
print "Your PHP Version: ".PHP_VERSION."<br><br><br>";

?>
first, i don't see anywhere in there where you are connecting to mysql... you must do that before you can check to see the version #...

also, PHP_VERSION should be PHPVERSION()

secondly try this instead :

Code: Select all

<?php
print "Checking MySQL Library Version, this must be >= 3.23.47<br><br>";
//--------------------Changed this line ---------------------------
printf("Your MySQL Server Version: %s\n", mysql_get_client_info());

print "Checking MySQL Server Version, this must be >= 4.x<br>";
//--------------------Changed this line ---------------------------
printf( "Your MySQL Server Version:  %s\n",mysql_get_server_info());
echo "<br><br>";

print "Checking PHP Version, this must be >= 4.3<br>
CaLogic was programed with PHP Version 4.3.2<br><br>";
//--------------------Changed this line ---------------------------
print "Your PHP Version: ".PHPVERSION()."<br><br><br>";

?>
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

are you sure mysql is on? php5 doesn't have mysql built into the executable.. it's an extension now.
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post by infolock »

heh overlooked the fact that is using php 5 :oops: used to php4
Post Reply