Hello,
I'm new to PHP and MySQL. I've installed PHP 5.2.9-2, MySQL 5.1 on Windows Vista/IIS 7.0. I can run phpinfo() and use ionCube loader successfully.
php.ini is ok. extension_dir=C:\Program Files\PHP\ext and MySQL extension line is uncommented.
However, I cannot call function mysql_connect() it gives fatal error: Call to undefined function mysql_connect().
How can i solve the error. Thanks in advance.
Note: I don't know why but phpinfo() doesn't display any info about mysql.
Fatal error: Call to undefined function mysql_connect()...
Moderator: General Moderators
-
mdemirci01
- Forum Newbie
- Posts: 1
- Joined: Wed Apr 22, 2009 7:36 am
Re: Fatal error: Call to undefined function mysql_connect()...
Check to ensure that you have installed everything correctly and that the function actually exists!
Code: Select all
<?php
$function = 'mysql_connect';
if (function_exists($function)) {
echo $function.' exists';
} else {
echo $function.' cannot be found';
}
?>
Re: Fatal error: Call to undefined function mysql_connect()...
I am also facing same error and using same version of PHP on Win2003.
I got this msg after testing with your code
mysql_connect cannot be found.
How to check the PHP.ini as there is no DLL section there in newer versions.
I got this msg after testing with your code
mysql_connect cannot be found.
How to check the PHP.ini as there is no DLL section there in newer versions.
Re: Fatal error: Call to undefined function mysql_connect()...
I could be wrong but you need to install a PHP extension so it can carry out MySQL functions. I'm not sure how to do this in Windows though as I use WAMP. I know you have to do this on *nix OS's.
Re: Fatal error: Call to undefined function mysql_connect()...
EDIT: Sorry, just re-read your initial post - this info is useless as you have already tried it.