Web Hosting Talk







View Full Version : IIS Ignoring Changes to php.ini


jimpoz
01-23-2007, 01:43 PM
OK, this one has stumped me, and an hour of googling has gotten me no closer.

I have PHP 5.1.6 running on a WinXPro box with IIS 5.1. I went into php.ini and enabled the gd2 extension. But for some reason, phpinfo() in a web page still doesn't reflect the change:

ftp
FTP support enabled

hash
hash support enabled

However, if I do php -i from the command line, the changes are there:

ftp

FTP support => enabled

gd

GD Support => enabled
:
: snip
:
XBM Support => enabled

hash

hash support => enabled

There is only one php.ini on my system, in c:\php. The configuration path in the web-phpinfo points to the right place. The PHPRC environment variable is correct. There was no HKLM\Software\PHP\IniFilePath registry key, so I created it.

I've stopped and restarted IIS; stopped IIS, waited, and restarted; stopped, waited, killed any dllhost.exe processes, and restarted; stopped, waited, removed and recreated the application, and restarted; stopped, deleted and recreated the ISAPI filter, and restarted; but nothing seems to work. I've altered php.ini on this box before (enabling MSSQL, etc) without going through this mess.

PHP-CLI sees the change, which tells me its an IIS/ISAPI problem. What am I missing?

WebDevourer
01-27-2007, 05:35 PM
Try putting your php.in in c:\windows or wherever your windows is. I stopped fighting with php on my windows box when I put the .ini there.

mwaseem
01-28-2007, 07:12 AM
1. As WebDevourer said, make sure that your php.ini in under %windir% or %windir%\system32

2. You need to restart IIS to reload the updated php.ini.

3. Make sure the anonymous IIS user has read access to php.ini, if your partition is NTFS.

jimpoz
01-29-2007, 06:21 PM
I think I found the problem:
extension=php_mbstring.dll
was listed twice.

I guess it considered the php.ini file invalid and thus didn't apply it.