Jump to content


MySQL working with PHP

  • Please log in to reply
3 replies to this topic

#1 eyegraphix

  • Members
  • PipPip
  • Member
  • 24 posts
  • LocationAmes, Iowa

Posted 19 August 2006 - 11:17 PM

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!

#2 venkateshinbox

  • Members
  • PipPip
  • Member
  • 10 posts
  • LocationIndia

Posted 20 August 2006 - 09:47 AM

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
Visit my online portfolio - www.phpdevteam.com

also, my recent web aggregator - www.liteboy.com

#3 wildteen88

  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 20 August 2006 - 11:03 AM

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.

#4 eyegraphix

  • Members
  • PipPip
  • Member
  • 24 posts
  • LocationAmes, Iowa

Posted 20 August 2006 - 02:35 PM

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.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users