I'm running PHP 5.3, FastCGI, and IIS 7 on Windows Server 2008. I have a site which I would like to configure its own php.ini settings for but things aren't working as expected. I am following the tutorial located here.

This is what I have done so far:

1) Configured a new website with it's own AppPool.

2) Selected PHP 5.3.6 from the PHP Manager available on the website home on IIS (not the web server home which sets the global version of PHP)

3) Added the following lines to the section of the applicationHost.config file located at system32/inetsrv/config

<application fullPath="C:\Program Files (x86)\PHP\v5.3\php-cgi.exe" arguments="-d open_basedir=C:\inetpub\wwwroot\kickasswebsite.com" maxInstances="4" idleTimeout="300" activityTimeout="30" requestTimeout="90" instanceMaxRequests="200" protocol="NamedPipe" queueLength="1000" flushNamedPipe="false" rapidFailsPerMinute="10">
        <environmentVariable name="PHPRC" value="c:\inetpub\wwwroot\kickasswebsite.com" />

4) I then create a php.ini file located in C:\inetpub\wwwroot\kickasswebsite.com (the location of the root of the website)

register_globals = on

5) I then run test.php which simply outputs everything the method call to phpinfo() returns.

At this point, I observe that the global setting for register_globals = off (as it should be), but the local setting for register_globals = off, even though I specified it differently in the php.ini file I created at the root of the site.

Furthermore, I see these settings in the output of the php.ini

Configuration File (php.ini) Path  C:\Windows
Loaded Configuration File  C:\Program Files (x86)\PHP\v5.3\php.ini  
Scan this dir for additional .ini files  (none)
Additional .ini files parsed  (none)      

What am I messing up on, or is there a different way to go about this?


I seemed to have answered my own question. Follow the directions on this site. I had to use a .user.ini file and all seems well in the world:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.