Jump to content

[SOLVED] undefined mysql_connect function (PHP523-IIS5-MYSQL5)


marz

Recommended Posts

I have a working IIS/PHP/Mysql on my desktop PC. I am currently for a 6weeks holiday in Finland and trying to install everything on my laptop to work with my php/mysql website related to this nature work-holiday. I got everything running (PHP pages showing well on the browser and mysql database loaded on mysql query browser) but I cannot get php-mysql to work becasue i get an "udefined mysql function" when I have the command mysql_connect in the php script.

 

Running phpinfo I noticed that I do not have mysql in the additional modules section. This is my 3 rd spoiled day trying to solve the problem and now I gave up. I have copied libmysql.dll everywhere (php dir, php/ext, windows/, windows/system32, windows/ext, inetsrv/ ) I tried several paths in dir_extensions of php.ini and unchecked the mysql and mysqli extensions.

 

PHP simply does not want to reckognize my MYSQL plug-in or whatever is called. I have PHP 5.23 and Mysql 5.0. I copied the working php.ini (PHP521) of the desktop onto the php.ini on my laptop to be sure that the settings are good (since coming from a working installation)

 

 

Please I really need help because I have to create a database-driven website about the wild plants in Finland.

 

I assume that Mysql 5 and php 5 is installed well and it is something with IIS or php.ini

Thank you

 

 

Link to comment
Share on other sites

I have made "ON" display startup errors in php.ini and when I restarted I got 5 blank error messages. This was a small window stating just "Error" and OK. I clicked OK and another one came for 5 times. Then the same fatal error: undefined mysql function

Link to comment
Share on other sites

I dont know where to bang my head!

 

Some questions:

 

1) Should I unremark mysql and mysqli in php.ini or mysql only?

 

2) I have taken libmysql.dll from the bin directory of the mySQL server )after being succesfully installed). Should I copy other files?

 

3) I am not sure about the path syntax in extension_dir = "". For location a C:/Program Files/PHP/Ext should I write "C:/Program Files/PHP/Ext" or  "C:/Program Files/PHP/Ext/" or "C:\Program Files\PHP\Ext" or "./C:/Program Files/PHP/Ext" ??

 

4) If mysql lib is installed well, should it appear in module extensions in php info?

 

 

Please I really need help. It raining for these 2 days and need to solve this out else my holiday is practically ruined  :( 

 

 

 

 

Link to comment
Share on other sites

D A M N !!!!  I solved it at last. I needed to copy another dll file : php_mysql.dll in the php prog dir. I am very surprised that nobody gave it a mention in this forum and few others. I got thereply when I was browsing for mysql php connector download in mysql website, and this was mentioned in the corresponding documentation.

 

I also removed the " " in the filename of extension dir  but I wonder if this had anything to do with the solution (extensions_dir = C:/Program files/PHP/Ext

 

I wonder why on earth PHP is not supporting MySQL anymore - most of us use php without mysql ???  ??? 

 

Thanks fenway  - I read that article but nothing mentioned about php_mysql.dll  :-[

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.