ID: 48461 User updated by: jonathan at strutt dot co dot uk Reported By: jonathan at strutt dot co dot uk -Status: Open +Status: Bogus Bug Type: IIS related Operating System: Windows Vista Business Eddition PHP Version: 5.2.9 New Comment:
AT LAST! I seem to have resolved the issue.... by placing the libmysql.dll in the c:\windows\system32 directory along with the php_mysql.dll file. I hasten to point out, this isn't the first time I've tried doing this, but this time I stopped the IIS7 server, moved the files, the started it again and it seems to have worked. This also seems to prevent the mystery changing of the ini file. And I don't think it's fixed the problem persay - the extension_dir is still c:\php\ext in the ini file, so either php isn't loading the extension from there, or the files need to be duplicated somewhere else for it to work!?!?!? Previous Comments: ------------------------------------------------------------------------ [2009-06-03 16:53:27] jonathan at strutt dot co dot uk In an interesting development, I've found that when moving the php.ini file between c:\php and c:\windows, it magically gets edited!!! If I edit the file away from the c:\windows dir, I can get php to recognise the changes. However, if I move it and edit as an ini file, it magically adjusts after the cut and paste and only shows only some of the changes made!! This is getting to be crazy!! ------------------------------------------------------------------------ [2009-06-03 13:47:29] jonathan at strutt dot co dot uk Description: ------------ Using IIS 7 over Windows Vista Business and PHP 5.2.9 in ISAPI mode. Receive the following error when trying to connect to MySQL database: Fatal error: Call to undefined function mysql_connect() in S:\northfusion\company\websites\cleverboxed\www\_assets\_includes\class_ db.php on line 16 In addition, when viewing the output of phpinfo(), it states the php.ini file being used is c:\windows\php.ini and that the extension library location is "./". However, in the c:\windows\php.ini file, the extension location is set to "C:\php\ext". It looks as though this isn't being picked up despite numerous IIS restarts. Reproduce code: --------------- //.. function connect() { // bring in config global $config; // create database handle $this->handle = mysql_connect($_config->db->host, $_config->db->username, $config->db->password); } //.. Expected result: ---------------- Open connection to the database Actual result: -------------- Returned error: Fatal error: Call to undefined function mysql_connect() in S:\northfusion\company\websites\cleverboxed\www\_assets\_includes\class_ db.php on line 16 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48461&edit=1