Jump to content

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

extension=php_mysql.dll
extension=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
[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!
Link to comment
https://forums.phpfreaks.com/topic/18061-mysql-working-with-php/
Share on other sites

Archived

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

×
×
  • Create New...

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.