PDA

View Full Version : Mysql is not enabled in phpinfo() of php 5.3.1


moon123
Feb 4, 2010, 02:08 AM
hi, I am having apache 2.2.14, php 5.3.1 and mysql 5.1.43 installed on vista. I am trying since 2 days to configure php to have mysql enable on phpinfo().

1. I modified php.ini to have extension_dir = "c:\php\ext"
2. modified the extension as extension="php_mysql.dll"
3. added "c:\php" to the "PATH" environment variable and restarted the vista.

after trying many combinations of putting php.ini, php_mysql.dll and libmysql.dll in c drive and/or c:/windows and/or c:/windows/system32 now I am with no options!

I do restart the apache after each modification. I used libmysql.dll present in mysql installation and that of older php version as php 5.3.1 has no libmysql.dll...
Any help will be appreciated.
Thanks in advance.

moon123
Feb 5, 2010, 12:13 AM
FIXED mysql is not enabled in phpinfo() of php 5.3.1

Finally I got the problem fixed. The steps to follow:
1. Make sure that MYSQL is started.
2. libmySQL.dll file should only be in mySQL install/bin folder and copy

The same dll in " c:\php "
3. php_mysql.dll should be only in " c:\php\ext "
4. php.ini file should be only in one place and that is " c:\php "
Make sure that you have saved the 'modified php.ini' filename correctly as

'php.ini' (in my case the filename was php.ini.ini) ;)
5. Now check the phpinfo() output, is 'Loaded Configuration File' showing

" c:\php\php.ini " If not then double check the "PHPInitDir" entry in

httpd.conf whether PHPInitDir is pointing to wrong directory. It should

Point to "c:/php"
Hope, this helps to someone...