eyegraphix Posted August 19, 2006 Share Posted August 19, 2006 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\extI've uncommented both php_mysql.dll and php_mysqli.dllextension=php_mysql.dllextension=php_mysqli.dllAll 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[code]<?php$db=mysqli_connect('localhost','blah','blah');?>[/code]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! Quote Link to comment https://forums.phpfreaks.com/topic/18061-mysql-working-with-php/ Share on other sites More sharing options...
venkateshinbox Posted August 20, 2006 Share Posted August 20, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/18061-mysql-working-with-php/#findComment-77511 Share on other sites More sharing options...
wildteen88 Posted August 20, 2006 Share Posted August 20, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/18061-mysql-working-with-php/#findComment-77521 Share on other sites More sharing options...
eyegraphix Posted August 20, 2006 Author Share Posted August 20, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/18061-mysql-working-with-php/#findComment-77557 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.