Jump to content

need help for Php5.2, mysql5.0 and iis 5.0


logitechcam

Recommended Posts

Hi guys

 

I want to use mysql 5.0 with php5.2.  I got php runs on my computer. but when i try to use mysql with php, i got an error like this:

Fatal error: Call to undefined function mysql_connect() .

 

i have already did the Configuration to php.ini file, but, i still have the error. can anyone give me some help?

 

Link to comment
Share on other sites

OK. Test to see if PHP is using the correct php.ini you are using. Simply create a file called test.php and add this to it:

<?php
phpinfo();
?>

 

Now run that file, look for the line beginning with Configuration File (php.ini) Path. Next that it should state the full path to the php.ini file PHP is using, if it is set to C:/WINDOWS on its own then php is not using the php.ini you are editing so any changes you make to the php.ini will not affect PHP.

 

To insure PHP is using the php.ini you are editing, copy the php.ini to the WINDOWS folder (C:/WINDOWS NOTE: If you don't have a WINDOWS folder move to the WINNT folder instead). Now restart IIS. Does the Configuration File (php.ini) Path line now show the correct path to the php.ini? If it is scroll down until you find the MySQL Heading. If you find the MySQL heading then the MySQL extension is now enabled.

 

If you cant find the MySQL heading then check that you have set the extension_dir directive to point PHP extension folder (C:/PHP/ext) and make sure you have copied a file called libmysql.dll from the PHP folder to the C:/WINDOWS folder. Now restart IIS and run phpinfo again. Check to see if there is a MySQL heading. If there is then the extension is loaded.

 

If you make any changes to the php.ini you must save it and the restart the server.

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.