JMair Posted September 18, 2008 Share Posted September 18, 2008 I've just installed PHP5 and MySql 5.1.11 on a fresh Win2003 server with IIS. PHP is installed fine, but in the phpinfo() , I have no mention of MySQL. In the Php.ini , the extensions are unchecked along with gd2 (that is shown in phpinfo()). The php_mysql.dll is in the php5/ext folder and I confirmed that mysql is up and running via the MySQLAdministrator gui tool. I'm not sure where else to look, so any suggestions will be welcome. Thank you kindly. Quote Link to comment https://forums.phpfreaks.com/topic/124814-solved-phpinfo-does-not-see-mysql/ Share on other sites More sharing options...
PFMaBiSmAd Posted September 18, 2008 Share Posted September 18, 2008 The following is the mysql installation section from the php manual for Windows. Have you done everything it mentions - Installation on Windows Systems PHP 4 The PHP MySQL extension is compiled into PHP. PHP 5+ MySQL is no longer enabled by default, so the php_mysql.dll DLL must be enabled inside of php.ini. Also, PHP needs access to the MySQL client library. A file named libmysql.dll is included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH. See the FAQ titled "How do I add my PHP directory to the PATH on Windows" for information on how to do this. Although copying libmysql.dll to the Windows system directory also works (because the system directory is by default in the system's PATH), it's not recommended. As with enabling any PHP extension (such as php_mysql.dll), the PHP directive extension_dir should be set to the directory where the PHP extensions are located. See also the Manual Windows Installation Instructions. An example extension_dir value for PHP 5 is c:\php\ext Note: If when starting the web server an error similar to the following occurs: "Unable to load dynamic library './php_mysql.dll'", this is because php_mysql.dll and/or libmysql.dll cannot be found by the system. Have you confirmed in the phpinfo() output that the php.ini that you are changing is the one that php is using? And after making any changes to php.ini, have you stopped and started the IIS service to get any changes made to php.ini to take effect? Quote Link to comment https://forums.phpfreaks.com/topic/124814-solved-phpinfo-does-not-see-mysql/#findComment-644942 Share on other sites More sharing options...
JMair Posted September 18, 2008 Author Share Posted September 18, 2008 The following is the mysql installation section from the php manual for Windows. Have you done everything it mentions - Installation on Windows Systems PHP 4 The PHP MySQL extension is compiled into PHP. PHP 5+ MySQL is no longer enabled by default, so the php_mysql.dll DLL must be enabled inside of php.ini. Also, PHP needs access to the MySQL client library. A file named libmysql.dll is included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH. See the FAQ titled "How do I add my PHP directory to the PATH on Windows" for information on how to do this. Although copying libmysql.dll to the Windows system directory also works (because the system directory is by default in the system's PATH), it's not recommended. As with enabling any PHP extension (such as php_mysql.dll), the PHP directive extension_dir should be set to the directory where the PHP extensions are located. See also the Manual Windows Installation Instructions. An example extension_dir value for PHP 5 is c:\php\ext Note: If when starting the web server an error similar to the following occurs: "Unable to load dynamic library './php_mysql.dll'", this is because php_mysql.dll and/or libmysql.dll cannot be found by the system. Have you confirmed in the phpinfo() output that the php.ini that you are changing is the one that php is using? And after making any changes to php.ini, have you stopped and started the IIS service to get any changes made to php.ini to take effect? It is a fresh install of PHP with no previous version of PHP done with binaries not a setup. Only one php.ini i've been playing with. I've also Restered the WWW services and restarted the machine just in case. But how do you enable the php_mysql.dll? Is is still just uncommenting out the extension? Quote Link to comment https://forums.phpfreaks.com/topic/124814-solved-phpinfo-does-not-see-mysql/#findComment-645009 Share on other sites More sharing options...
JMair Posted September 23, 2008 Author Share Posted September 23, 2008 MySQL is up and running just fine. I'm just having troubles setting up the new PHP5 to recognize MySQL. I've uncommented the extension. Made sure the mysql lib is in the php folder. I've also created (or I believe I have created) the System variables for MYSQL correctly. I've also (although I dont know if it's needed) have added the MySQLLib to the web service extensions. Not sure what else I"m missing. Anything? Quote Link to comment https://forums.phpfreaks.com/topic/124814-solved-phpinfo-does-not-see-mysql/#findComment-648767 Share on other sites More sharing options...
JMair Posted September 23, 2008 Author Share Posted September 23, 2008 had to add the libmysql.dll to the system32 folder.. I dont remember doing this with php4, but i forget a lot of things Quote Link to comment https://forums.phpfreaks.com/topic/124814-solved-phpinfo-does-not-see-mysql/#findComment-648992 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.