Reputation: 3251
Is there any way to set the usual php.ini variables on an IIS 7.5 server, using web.config files? I'd like to set short_open_tag and environment variables.
Upvotes: 2
Views: 7721
Reputation: 11790
<fastCgi>
<application fullPath="C:\PHP\php-cgi.exe">
<environmentVariables>
<environmentVariable name="PHPRC" value="C:\WebSites\website1" />
</environmentVariables>
</application>
<application fullPath="C:\PHP\php-cgi.exe">
<environmentVariables>
<environmentVariable name="PHPRC" value="C:\WebSites\website2" />
</environmentVariables>
</application>
</fastCgi>
Or as http://ruslany.net/2009/07/per-site-php-configuration-with-php-5-3-and-iis/ says, add user_ini.filename = .user.ini
to php.ini and drop .user.ini
files in the root of the sites.
Upvotes: 5