Jump to content


This topic is now archived and is closed to further replies.


MySQL working with PHP

Recommended Posts

I have PHP 5.1.4, Apache 2.0.52, and MySQL 4.0.23 running on my local machine with Windows XP. PHP works fine but I can't get it to work with mysql.

Here's my php.ini file. The extension directory has been set.

; Directory in which the loadable extensions (modules) reside.
extension_dir = C:\php\ext

I've uncommented both php_mysql.dll and php_mysqli.dll


All the modules are in the ext directory since I extracted all of them from the binary installation. I also put the libmysql.dll in the C:\windows folder. PHP is also looking at the correct php.ini file which is in my C:\windows folder and the configuration file path(php.ini) says C:\windows.

The code Im using to test is just

and the error i get is "Fatal error: Call to undefined function mysqli_connect() in C:\Documents and Settings\Andrew\My Documents\Eyegraphix\comments2.php on line 2"

I've tried everything I can think of and I've looked through past topics here. Someone please help me. Thanks!

Share this post

Link to post
Share on other sites
it s not $db=mysqli_connect('localhost','blah','blah');

you can check the mysql connection as mysql_connect('localhost','root','blah');

visit www.php.net for further clarifications

Share this post

Link to post
Share on other sites
Did you restart Apache when you changed the php.ini. It is important you restart the server for the new PHP configuration to come available.

Share this post

Link to post
Share on other sites
Yes I had restarted the apache server. Actually I just removed everything and installed wamp instead, everything works fine so I'm just gonna stick with that. Thanks for the help.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.