<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>IIS 7 - FastCGI Module</title><link>http://forums.iis.net/1104.aspx</link><description>Questions related to the FastCGI module for IIS7</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Separate PHP.ini for each website?</title><link>http://forums.iis.net/thread/1906660.aspx</link><pubDate>Thu, 11 Jun 2009 18:53:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1906660</guid><dc:creator>v-edsojo</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1906660.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1104&amp;PostID=1906660</wfw:commentRss><description>&lt;p&gt;Hi, here is an article that explains how to work with differents php.ini in IIS7:&lt;br /&gt;&lt;a href="http://eng.eduardosojo.com/differents-phpini-config-file-for-each-websit"&gt;http://eng.eduardosojo.com/differents-phpini-config-file-for-each-websit&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;</description></item><item><title>Re: Separate PHP.ini for each website?</title><link>http://forums.iis.net/thread/1901511.aspx</link><pubDate>Wed, 22 Apr 2009 16:44:43 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1901511</guid><dc:creator>v-edsojo</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1901511.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1104&amp;PostID=1901511</wfw:commentRss><description>&lt;p&gt;You´re right Kanwal...&lt;/p&gt;
&lt;p&gt;Part of the explanation on iis.net (&lt;a href="http://rurl.me/ws85"&gt;http://rurl.me/ws85&lt;/a&gt;):&lt;/p&gt;
&lt;h3&gt;Specifying php.ini location&lt;/h3&gt;
&lt;p&gt;When the PHP process starts it determines the location of the configuration php.ini file by using various settings. &lt;a href="http://www.php.net/manual/en/configuration.php"&gt;&lt;font color="#034af3"&gt;The PHP documentation&lt;/font&gt;&lt;/a&gt; provides detailed description of the PHP start up process. Note that one of the places where PHP process searches for php.ini location is the PHPRC environment variable. If PHP process finds a php.ini file in the path specified in this environment variable then it will use it, otherwise it will revert to default location of php.ini. This environment variable can be used to allow hosting customers to use their own versions of php.ini files.&lt;/p&gt;
&lt;p&gt;For example if there are two websites: website1 and website2; located at the following file paths: C:\WebSites\website1 and C:\WebSites\website2 then the php-cgi.exe process pools in the &amp;lt;fastCgi&amp;gt; section of applicationHost.config can be configured as below:&lt;/p&gt;
&lt;p&gt;&amp;lt;fastCgi&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;application fullPath=&amp;quot;C:\PHP\php-cgi.exe&amp;quot; arguments=&amp;quot;-d open_basedir=C:\Websites\Website1&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;environmentVariables&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;environmentVariable name=&amp;quot;PHPRC&amp;quot; value=&amp;quot;C:\WebSites\website1&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/environmentVariables&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/application&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;application fullPath=&amp;quot;C:\PHP\php-cgi.exe&amp;quot; arguments=&amp;quot;-d open_basedir=C:\WebSites\Website2&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;environmentVariables&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;environmentVariable name=&amp;quot;PHPRC&amp;quot; value=&amp;quot;C:\WebSites\website2&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/environmentVariables&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/application&amp;gt;&lt;br /&gt;&amp;lt;/fastCgi&amp;gt; &lt;/p&gt;
&lt;p&gt;This way website1 can have its own version of php.ini in the C:\WebSites\website1, while website2 can have its own version of php.ini located in C:\WebSites\website2. This configuration also ensures that if there is no php.ini found in location specified by PHPRC environment variable then PHP will fall back to using the default php.ini file located in the same folder where php-cgi.exe is located.&lt;/p&gt;
&lt;p&gt;--------------------------------------------------------------------------------------------------------------------------------------&lt;/p&gt;</description></item><item><title>Re: Separate PHP.ini for each website?</title><link>http://forums.iis.net/thread/1901433.aspx</link><pubDate>Tue, 21 Apr 2009 21:51:38 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1901433</guid><dc:creator>ksingla</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1901433.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1104&amp;PostID=1901433</wfw:commentRss><description>&lt;p&gt;Instead of using -c switch, you can use PHPRC environment variable to specify the path from where ini file should be picked. Read how to set per site ini file &lt;a class="" title="http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/" href="http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/"&gt;here&lt;/a&gt;. Search for PHPRC.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Kanwal&lt;/p&gt;</description></item><item><title>Re: Separate PHP.ini for each website?</title><link>http://forums.iis.net/thread/1901420.aspx</link><pubDate>Tue, 21 Apr 2009 20:11:08 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1901420</guid><dc:creator>v-edsojo</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1901420.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1104&amp;PostID=1901420</wfw:commentRss><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;The problem is that for php compiler you have to use is&amp;nbsp;&lt;strong&gt;-c &amp;lt;php.ini_file_path&amp;gt;&lt;/strong&gt; but it only works for php.exe not for php-cgi.exe&lt;/p&gt;
&lt;p&gt;I had to use php.exe instead of php-cgi.exe and in&amp;nbsp;my website´s handler mapping&amp;nbsp;i configured php extension using &amp;quot;C:\&amp;lt;php_root&amp;gt;\php.exe&amp;quot;|-c &amp;lt;new_php.ini_file_path&amp;gt;&lt;/p&gt;
&lt;p&gt;You can also&amp;nbsp;test php-cgi by console putting the following command:&lt;/p&gt;
&lt;p&gt;&lt;font face="courier new,courier"&gt;C:\&amp;lt;php_root&amp;gt;\php-cgi -c &amp;lt;php.new_ini_file_path&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;If it works, it will works on IIS.&lt;/p&gt;</description></item><item><title>Re: Separate PHP.ini for each website?</title><link>http://forums.iis.net/thread/1901400.aspx</link><pubDate>Tue, 21 Apr 2009 17:34:58 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1901400</guid><dc:creator>ksingla</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1901400.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1104&amp;PostID=1901400</wfw:commentRss><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;FastCGI section has fullPath and arguments as key. Both&amp;nbsp;values combined but separated by &amp;#39;|&amp;#39; (pipe character) is treated as key. You need to specify this key in handlers section. In you case, you will give &amp;quot;c:\php\php-cgi.exe|-cd:\website2&amp;quot; as the scriptProcessor in handler mapping.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Kanwal&lt;/p&gt;</description></item><item><title>Separate PHP.ini for each website?</title><link>http://forums.iis.net/thread/1901354.aspx</link><pubDate>Tue, 21 Apr 2009 15:35:03 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1901354</guid><dc:creator>brianlewis</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1901354.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1104&amp;PostID=1901354</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m trying to setup a website to use a different php.ini from the default that most websites use on the server. I can go to Internet Service Manager, SERVERNAME, FastCGI Settings, click Add Application, I use&lt;/p&gt;
&lt;p&gt;Full Path : c:\php\php-cgi.exe&lt;/p&gt;
&lt;p&gt;Arguments : -cd:\website2\&lt;/p&gt;
&lt;p&gt;This is telling php-cgi to find the ini file in d:\websites2&lt;/p&gt;
&lt;p&gt;The problem I&amp;#39;m having is I then go to the website, go to mappings, add the ModuleMapping of FastCGIModule but how do I tell it to use the unique configuration I gave it above?&lt;/p&gt;
&lt;p&gt;Only idea I can come up with is to copy php-cgi.exe to a unique folder or name it something else like php-website2.exe, but then I would have to remember to update that file each time I updated php to the latest version unless I used mklink to create a symbolic link.&lt;/p&gt;
&lt;p&gt;Is that the only way to differentiate the mappings between the website and the applicationhost.config fastcgi mappings, thru using a unique filename or path?&lt;/p&gt;</description></item></channel></rss>