Forum Moderators: coopster
The PHP files (and php.ini) are located in C:\php, and the extensions are located in C:\php\ext. In php.ini I have the extension directory set as ./ext, and I also have it set to load both the Oracle and MySQL modules. I also have dl() enabled.
When I run phpinfo() it says that no modules have been loaded, even though both exist in the extension directory (and PHP 5 should have MySQL support by default).
Even when a script (phpMyAdmin) uses dl(), the modules cannot be loaded.
Any suggestions?
Lately, I have had to copy the php.ini to my C:\windows directory to get mysql extensions to work. There have also been times when it did not seem to be necessary. Don't know why, just know that php worked fine but extensions wouldn't work until I copied the .ini to windows.
I also specify the full path: extension_dir = "c:\php5\ext\"
And I have personally had problems if I forgot the last \ after ext.
For my most recent installation, I HAD to download the dll's from mysql directly. (libmysql.dll & php_mysql) The ones that came with php5 didn't work.
Good luck,
Scott
extension_dir = C:/PHP5/ext
This may also help:
[webmasterworld.com...]
From php.ini:
extension=php_msql.dll
extension=php_mysql.dll
extension_dir = "C:\php\ext" (also tried ./ext and C:/php/ext with an without ""s)
From php_info printout:
extension_dirC:\php\extC:\php\ext
enable_dlOnOn
Under Additional Modules:
...none listed
I'm not an expert by any means so all I can tell you is exactly what my settings are.
All I can say is:
extension_dir = "c:\php5\ext\"
was a direct cut and paste from my .ini (quotes are present in the ini)
Did you download the .dll's FROM Mysql? From version PHP5+ I had to, previous to that, the dll's in the PHP distribution worked.
Did you copy you your php.ini file to your windows dir? When you run phpinfo(); where does it show the .ini lives?
I've also heard that some people have had to copy the .dll's to windows as well (or set your paths correctly)
If you would like, I will email you my php.ini and httpd.conf. Send an email to rscottdoesnotwantspamcentroidcnc.com and I will reply
substitute @ for does not want spam.
How do I add my PHP directory to the PATH on Windows? [php.net]