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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.