Check the following:
Make sure you only have one php.ini
file. It should be in the same folder as php.exe
, php-cgi.exe
and php-win.exe
. It's worth checking your c:\windows
and c:\windows\system32
folders. If you find a php.ini
in there or anywhere else on the PATH
other than the PHP install folder then delete them.
A handy way to check this is to run where php.ini
from the command prompt.
Add your PHP install and extensions folders to the system PATH
: For example - c:\php
and c:\php\ext
Edit your php.ini
file and ensure that the extension_dir
directive points to the extensions folder: extension_dir=c:\php\ext
This should get you going. If you still find that extensions aren't being loaded then prepend the extension with ext/
. For example:
extension=ext/php_mysql.dll
You don't indicate if you're using FastCGI to launch PHP.
If you're just mapping the .php
extension directly to php-cgi.exe
or you're using FastCGI but haven't specified a monitorChangesTo
attribute then you need to kill any php-cgi.exe
processes to force a re-read of php.ini
after any changes (or do an IISRESET
).
If you're using FastCGI on Windows 7 (or IIS 7.5 generally) then you can trigger recycling of FastCGI whenever your php.ini
file changes by specifying a the path to the php.ini
file in the monitorChangesTo
attribute. This is also configurable through IIS Manager under the FastCGI Settings applet.