Jump to content

Recommended Posts

Description of Problem:  When I  try to connect to mysql I obtain the fatal error: Call to undefined function mysql_connect() message.

My XP home operating system is loaded with Apache 2, PHP 5.1.4, and mysql. PHP programs execute without any problems. Command line querys to mysql work great. The problem appears to be php is not talking to mysql. I verified the php.ini file extension.dir = "C:\php\ext" and that the extension=php_mysql.dll is set to work. I also checked that the php.ini file is in the windows folder. I rebooted the system - still a no go getting php to connect to mysql. Any suggestions? Thanks from Ted.

 

 

Yes, I'm aware of the license change and I've changed the php.ini file extension_dir to "C:\php\ext" and theextension=php_mysql.dll. I verified that the php.ini file is in the WINDOWS folder and that a copy of the php_mysql.dll librat is in the WINDOWS folder. The problem with php connecting to mysql on a windows xp platform still exists!

I been meaning to update that FAQ, anon linked you to. Moving files out side of the PHP folder is no longer recommended. Keep all files where they are when PHP is installed.

 

Firstly did you install PHP using the installer? If you have, go to php.net and download the zipped binaries package rather than the PHP installer. Extract the zip to where you have PHP installed, now move your php.ini in C:\Windows back to C:\php. Delete all other files you have moved <- these will interfere.

 

Next step add PHP to the PATH Environment Variable.

 

Once you have done the above make sure PHP is reading the php.ini you're editing, by running phpinfo function. Ignore the Configuration File (php.ini) Path line. Concentrate on the Loaded Configuration File line. It should read C:/php/php.ini

 

If it is, has the MySQL extension loaded? You can tell this by scrolling down and finding a MySQL subheading.

 

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.