marz Posted July 18, 2007 Share Posted July 18, 2007 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 https://forums.phpfreaks.com/topic/60503-solved-undefined-mysql_connect-function-php523-iis5-mysql5/ Share on other sites More sharing options...
marz Posted July 18, 2007 Author Share Posted July 18, 2007 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 https://forums.phpfreaks.com/topic/60503-solved-undefined-mysql_connect-function-php523-iis5-mysql5/#findComment-300995 Share on other sites More sharing options...
fenway Posted July 18, 2007 Share Posted July 18, 2007 Sounds like you don't have the right mysql(i) libraries installed. Link to comment https://forums.phpfreaks.com/topic/60503-solved-undefined-mysql_connect-function-php523-iis5-mysql5/#findComment-301162 Share on other sites More sharing options...
marz Posted July 18, 2007 Author Share Posted July 18, 2007 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 https://forums.phpfreaks.com/topic/60503-solved-undefined-mysql_connect-function-php523-iis5-mysql5/#findComment-301494 Share on other sites More sharing options...
marz Posted July 18, 2007 Author Share Posted July 18, 2007 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 https://forums.phpfreaks.com/topic/60503-solved-undefined-mysql_connect-function-php523-iis5-mysql5/#findComment-301513 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.