<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
    <channel>
        <title>Web-Site-Scripts.com - PHP</title>
        <link>http://www.web-site-scripts.com/knowledge-base/category/81</link>
        <description><![CDATA[Root / KnowledgeBase Manager Pro / Installation Manual / PHP]]></description>
        <language>en-us</language>
        <generator>KnowlageBase RSS Generator</generator>

         
                <item>
                        <title>Recommended FastCGI settings for IIS7+MSSQL</title>
                                    <link>http://www.web-site-scripts.com/knowledge-base/article/AA-00685</link>
                                    <description><![CDATA[<h3><span style="font-size: 13px; line-height: 18px; color: rgb(0, 0, 0); font-weight: normal; ">Watch this short video to learn how to setup recommended FastCGI settings if you're using IIS7 and MSSQL.</span></h3>
<p>Ensure that the&nbsp;<a href="http://www.iis.net/download/AdministrationPack" target="_blank" rel="nofollow">Administration Pack for IIS 7</a>&nbsp;is installed on your server! If not - please install it first,&nbsp;<b>otherwise you wouldn't see the option for configuring FastCGI settings</b>!</p>
<p><a href="#" onclick="window.open('http://web-site-scripts.com/knowledge-base/pages/instancemaxrequests.html', 'videotour', 'scrollbars=0,resizable=0,width=1142,height=758');return false;"><img style="border-width: 1px; margin: 0px;" title="Take the KnowledgeBase Manager Pro Video Tour" alt="Take the KnowledgeBase Manager Pro Video Tour" src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00495/fastcgi-performance.png" align="" border="1" height="238" hspace="0" vspace="0" width="376"></a></p>
]]></description>
                                    <pubDate>Fri, 17 Jun 2011 10:46:59 +0000</pubDate>
                                    <guid>http://www.web-site-scripts.com/knowledge-base/article/AA-00685</guid>
                    </item>
                <item>
                        <title>Checking your PHP settings with phpinfo()</title>
                                    <link>http://www.web-site-scripts.com/knowledge-base/article/AA-00616</link>
                                    <description><![CDATA[<p><b>phpinfo()</b> is the PHP function that outputs your current PHP settings.</p>
<p>It may be useful if you're installing or configuring PHP and want to check if&nbsp;everything&nbsp;is fine, or if you're troubleshooting a problem connected with PHP.</p>
<p><span style="border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">
</span></p>
<ol><li>Create an <b>info.php</b> page in your site that contains the following:
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 17px; margin-left: 0px; font-size: 12px; line-height: 1.4em; "></p>
<div class="preformatted"><div class="preformattedContent">&lt;?php<br>phpinfo();<br>?&gt;</div></div>Use a plain text editor for this, e.g. Notepad or Notepad++. Do not use Word or Wordpad for this!</li><li>Open it in your browser, e.g. if you put the file to the web root folder, open http://www.yourwebsite.com/info.php</li><li>You'll get something like this:<br><br><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00616/phpinfo.png" style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; " title="" alt="" border="0"><br></li></ol>
<p></p>
<p></p>
]]></description>
                                    <pubDate>Mon, 27 Dec 2010 15:26:29 +0000</pubDate>
                                    <guid>http://www.web-site-scripts.com/knowledge-base/article/AA-00616</guid>
                    </item>
                <item>
                        <title>Database extensions for PHP (MySQL, Microsoft SQL)</title>
                                    <link>http://www.web-site-scripts.com/knowledge-base/article/AA-00595</link>
                                    <description><![CDATA[<p>KMP uses MySQL or MS SQL database to store most of its data. You would need to have a database driver (realized as a&nbsp;PHP extension) to enable KMP connect to a database server. Chose the link below which matches your web server operation system and desired database type.</p><p></p><ul><li><a href="ARTICLE_URL#678##AA-00717#" target="">Drivers for Linux - MySQL</a></li><li><a href="ARTICLE_URL#677##AA-00716#" target="">Drivers for Windows - MySQL</a></li><li><a href="ARTICLE_URL#681##AA-00720#" target="">Drivers for IIS6 (Windows 2003/XP) - MSSQL</a></li><li><a href="ARTICLE_URL#679##AA-00718#" target="">Drivers for IIS7 (Windows 2008/7) - MSSQL</a></li><li><a href="ARTICLE_URL#709##AA-00748#" target="">Drivers for Windows + Apache - MSSQL</a></li></ul><p></p><p><br></p><p><br></p><p></p>
<p>
</p>
<p></p>
<div>
<p></p>

<p></p>
</div>]]></description>
                                    <pubDate>Mon, 29 Nov 2010 17:10:02 +0000</pubDate>
                                    <guid>http://www.web-site-scripts.com/knowledge-base/article/AA-00595</guid>
                    </item>
                <item>
                        <title>PHP installation</title>
                                    <link>http://www.web-site-scripts.com/knowledge-base/article/AA-00497</link>
                                    <description><![CDATA[<p></p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 17px; margin-left: 0px; font-size: 12px; line-height: 1.4em; ">If you need to install PHP on IIS server, see the respective guide:</p><ul style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 40px; margin-top: 0px; margin-right: 0px; margin-bottom: 17px; margin-left: 0px; font-size: 12px; list-style-position: outside; line-height: 1.6em; "><li style="padding-top: 1px; padding-right: 0px; padding-bottom: 1px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 12px; list-style-type: disc; list-style-position: initial; list-style-image: initial; line-height: inherit; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 16px; "><a href="ARTICLE_URL#452##AA-00491#" target="">PHP installation on IIS6</a></span></li><li style="padding-top: 1px; padding-right: 0px; padding-bottom: 1px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 12px; list-style-type: disc; list-style-position: initial; list-style-image: initial; line-height: inherit; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 16px; "><a href="ARTICLE_URL#456##AA-00495#" target="">PHP installation on IIS7 and IIS7.5</a></span></li></ul><div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 12px; "><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 17px; margin-left: 0px; font-size: 12px; line-height: 1.4em; ">These guides include full information about downloading, installing, and configuring of PHP and FastCGI on your IIS server.</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 17px; margin-left: 0px; font-size: 12px; line-height: 1.4em; ">You can alternatively use one of the all-in-one packages that include all required components: Apache, MySQL, and PHP. You can download it from the&nbsp;respective&nbsp;website:</p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 17px; margin-left: 0px; font-size: 12px; line-height: 1.4em; "></p><ul style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 40px; margin-top: 0px; margin-right: 0px; margin-bottom: 17px; margin-left: 0px; font-size: 12px; list-style-position: outside; line-height: 1.6em; "><li style="padding-top: 1px; padding-right: 0px; padding-bottom: 1px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 12px; list-style-type: disc; list-style-position: initial; list-style-image: initial; line-height: inherit; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 16px; "><a href="http://www.wampserver.com/en/download.php" target="_blank" rel="nofollow">Download WAMP</a></span></li><li style="padding-top: 1px; padding-right: 0px; padding-bottom: 1px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 12px; list-style-type: disc; list-style-position: initial; list-style-image: initial; line-height: inherit; "><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 16px; "><a href="http://www.apachefriends.org/en/xampp.html" target="_blank" rel="nofollow">Download XAMMP</a></span></li></ul><p></p></div><p></p><p></p>]]></description>
                                    <pubDate>Thu, 25 Feb 2010 13:43:02 +0000</pubDate>
                                    <guid>http://www.web-site-scripts.com/knowledge-base/article/AA-00497</guid>
                    </item>
                <item>
                        <title>PHP installation on IIS7 and IIS7.5</title>
                                    <link>http://www.web-site-scripts.com/knowledge-base/article/AA-00495</link>
                                    <description><![CDATA[<p>This guide describes installation of PHP with FastCGI on IIS7 server.</p>
<p>We <b>strongly recommend</b> you to use the latest version of PHP (v5.3+). Earlier versions of PHP for Windows have&nbsp;<a href="http://bugs.php.net/bug.php?id=44994" target="_blank" rel="nofollow">bugs</a>&nbsp;and may freeze when launch external programs (e.g. attachment indexation plugins) using Windows command line.</p>
<p><span style="border-collapse: collapse;"><span style="line-height: 18px; border-collapse: separate; ">Actual PHP versions work with IIS via FastCGI interface. We will explain how to install FastCGI and configure it to work with PHP.</span></span></p>
<p><span style="border-collapse: collapse;"></span></p>
<p></p>
<ul><li><span style="line-height: 16px;"><a href="#install-fcgi" target="">Installing the FastCGI Extension for IIS 7</a></span></li><ul><li><span style="line-height: 16px;"><a href="#win-2008" target="">Windows Server 2008</a></span></li><li><span style="line-height: 16px;"><a href="#windows-7-vista" target="">Windows 7 and Windows Vista SP1</a></span></li><li><span style="line-height: 16px;"><a href="#update-cgi" target="">Install the update for FastCGI module</a></span></li></ul><li><span style="line-height: 16px;"><a href="#install-php" target="">Download and Install PHP</a></span></li><li><span style="line-height: 16px;"><a href="#php-requests" target="">Configure IIS 7 to Handle PHP Requests</a></span></li><ul><li><span style="line-height: 16px;"><a href="#iis-manager" target="">Using IIS Manager</a></span></li><li><a href="#performance" target="">Setting FastCGI Configuration for Optimal Performance</a></li></ul><li><span style="line-height: 16px;"><a href="#default-document" target="">Configure default document in IIS</a></span></li><li><span style="line-height: 16px;"><a href="#testing" target="">Testing PHP CGI</a></span></li></ul>
<p></p>
<p></p>
<p></p>
<p></p>
<h1><a name="install-fcgi" ></a>Installing the FastCGI Extension for IIS 7</h1>
<h2><a name="win-2008" ></a>Windows Server 2008</h2>
<p>Add the CGI role service by going to Server Manager -&gt; Roles -&gt; Add Role Services. This enables both the CGI and FastCGI services:<br></p>
<p><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00495/cgi-2008.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="587" hspace="0" vspace="0" width="780"><br></p>
<h2><a name="windows-7-vista" ></a>Windows 7 and Windows Vista SP1</h2>
<p>Add the CGI feature by going to Control Panel -&gt; Programs and Features -&gt; Turn Windows features on or off. This enables both the CGI and FastCGI services.</p>
<p><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00495/cgi-vista-7.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="376" hspace="0" vspace="0" width="430"><br></p>
<p></p>
<h2><a name="update-cgi" ></a>Install the update for FastCGI module</h2>
<p>The update for IIS 7 FastCGI module fixes several known compatibility issues with popular PHP applications. Install the update from one of the following locations:</p>
<p></p>
<p></p>
<ul><li><span style="line-height: 16px;"><a href="http://www.microsoft.com/downloads/info.aspx?na=22&amp;p=1&amp;SrcDisplayLang=en&amp;SrcCategoryId=&amp;SrcFamilyId=&amp;u=%252fdownloads%252fdetails.aspx%253fFamilyID%253dd0343911-1775-4aef-8c99-5f13862ac386%2526DisplayLang%253den" target="_blank" rel="nofollow">Update for Windows Server 2008</a></span></li><li><span style="line-height: 16px;"><a href="http://www.microsoft.com/downloads/info.aspx?na=22&amp;p=3&amp;SrcDisplayLang=en&amp;SrcCategoryId=&amp;SrcFamilyId=&amp;u=%252fdownloads%252fdetails.aspx%253fFamilyID%253d70278393-3291-4aa1-870b-0e9b0907bddf%2526DisplayLang%253den" target="_blank" rel="nofollow">Update for Windows Server 2008 x64 Edition</a></span></li><li><span style="line-height: 16px;"><a href="http://www.microsoft.com/downloads/info.aspx?na=22&amp;p=5&amp;SrcDisplayLang=en&amp;SrcCategoryId=&amp;SrcFamilyId=&amp;u=%252fdownloads%252fdetails.aspx%253fFamilyID%253d98e06637-0f00-45d5-83c5-ed1b41fd6a7b%2526DisplayLang%253den" target="_blank" rel="nofollow">Update for Windows Server 2008 for Itanium-based Systems</a></span></li><li><span style="line-height: 16px;"><a href="http://www.microsoft.com/downloads/info.aspx?na=22&amp;p=2&amp;SrcDisplayLang=en&amp;SrcCategoryId=&amp;SrcFamilyId=&amp;u=%252fdownloads%252fdetails.aspx%253fFamilyID%253d19600729-8470-4956-a276-200450d814bd%2526DisplayLang%253den" target="_blank" rel="nofollow">Update for Windows Vista SP1</a></span></li><li><span style="line-height: 16px;"><a href="http://www.microsoft.com/downloads/info.aspx?na=22&amp;p=4&amp;SrcDisplayLang=en&amp;SrcCategoryId=&amp;SrcFamilyId=&amp;u=%252fdownloads%252fdetails.aspx%253fFamilyID%253dc7066c3b-dcf7-4441-87bc-f7dcb51067d0%2526DisplayLang%253den" target="_blank" rel="nofollow">Update for Windows Vista SP1 for x64 based Systems</a></span></li></ul>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<h1><a name="install-php" ></a>Download and Install PHP</h1>
<p></p>
<ol><li><a href="http://windows.php.net/download/" target="_blank" rel="nofollow">Download the latest PHP package for Windows</a>&nbsp;<br>You need PHP v5.3 or higher. Choose ZIP package <b>VC9 x86 Non Thread Safe</b>.<br><span style="color: rgb(51, 102, 0); font-weight: bold;"></span></li><li>Extract the contents of PHP zip package to a folder on your server, e.g. <b>C:\PHP\</b></li><li>Make a copy of the&nbsp;<b>php.ini-production</b> file and name it <b>php.ini</b></li><li>Open the <b>php.ini</b> and setup the following parameters. Every parameter already exists in the php.ini and you just need to find it, uncomment (by removing ";" character from the beginning of the line), and change its value.&nbsp;<span style="border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">Make sure that you do not have one of these options specified twice in the php.ini file.</span><br><div class="preformatted">
<div class="preformattedContent"><div class="preformattedContent">
<p>memory_limit = 256M<br>post_max_size = 128M<br>extension_dir = "C:\PHP\ext"<br>upload_tmp_dir = "C:\PHP\upload"<br>upload_max_filesize = 128M</p>
<p></p>
<p>max_execution_time = 600<br>max_input_time = 600<br>max_input_vars = 2000</p>
<p></p>
<p>cgi.force_redirect = 0<br>cgi.fix_pathinfo = 1<br>fastcgi.impersonate = 1</p><p>
extension=php_curl.dll<br>extension=php_mbstring.dll<br>extension=php_exif.dll<br>extension=php_gd2.dll<br>extension=php_ldap.dll<br>extension=php_mysqli.dll<br><br>session.save_path = "C:\PHP\session"
</p><p>session.use_cookies = 1</p><p></p>
</div></div></div><div class="attention">
<div class="attentionHeader">Extensions Loading Order<br></div>
<div class="attentionContent">
<p>
It is required to load "php_mbstring.dll" extension <b>before</b> "php_exif.dll". Make sure that order of extensions in your php.ini is the same as shown above.</p>
</div></div></li><li>Create "<b>upload</b>" and "<b>session</b>" sub-directories in the C:\PHP\ directory. You can use different names, just make sure that they match&nbsp;<span style="font-family: Courier; line-height: 13px;">upload_tmp_dir<font face="Arial, Helvetica, sans-serif"><span style="line-height: 16px;">&nbsp;and&nbsp;</span></font>session.save_path</span> parameters that you've set in the php.ini.</li><li>Setup <b>date.timezone</b> parameter in php.ini, for example:<br><div class="preformatted">
<div class="preformattedContent">
date.timezone = "America/New_York"<br></div>
</div>
<p>Chose your city or at least a city from your time zone.</p>
You can find the <a href="http://php.net/manual/en/timezones.php" target="_blank" rel="nofollow">full list of possible date.timezone values on PHP.net website</a>.<br><br></li><li>Save the php.ini.</li><li>To test if the PHP installation is successful, run the following from the command line prompt:<br><div class="preformatted">
<div class="preformattedContent">C:\PHP&gt;php -info</div></div><br>
<div class="info"><div class="infoHeader">If PHP Fails to Start</div><div class="infoContent">
<p>
VC9 Versions are compiled with the Visual Studio 2008 compiler and have improvements in performance and stability. The VC9 versions require you to have the&nbsp;<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF" target="_blank" rel="nofollow">Microsoft 2008 C++ Runtime (x86)</a>&nbsp;&nbsp;or the&nbsp;<a href="http://www.microsoft.com/downloads/details.aspx?familyid=bd2a6171-e2d6-4230-b809-9a8d7548c1b6&amp;displaylang=en" target="_blank" rel="nofollow">Microsoft 2008 C++ Runtime (x64)</a>&nbsp;&nbsp;installed. You may need to download these extensions on old versions of Windows if PHP is unable to start.</p>
</div></div></li></ol><div><div style="font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; ">
<h2 style="color: rgb(91, 91, 91); font-size: 13px; line-height: normal; "><span style="font-weight: normal; font-size: 12px; line-height: 16px;">
</span></h2>
<h2 style="color: rgb(91, 91, 91); font-size: 13px; line-height: normal; "><div><span style="line-height: 16px; "><div>
<h1 style="font-weight: normal; "><a name="php-requests" ></a>Configure IIS 7 to Handle PHP Requests</h1>
<p style="font-weight: normal; "><font color="#000000" face="Arial, Helvetica, sans-serif">In order for IIS 7 to host PHP applications, it is necessary to add a handler mapping that tells IIS to pass all PHP specific requests to the PHP application framework via FastCGI protocol.<br><br>This can be done using IIS Manager or using command line.</font></p>
<p style="font-weight: normal; "><font color="#000000" face="Arial, Helvetica, sans-serif"></font></p>
<font color="#000000" face="Arial, Helvetica, sans-serif">
<h2 style="font-weight: normal; "><a name="iis-manager" ></a>Using IIS Manager</h2>
<p style="font-weight: normal; ">Open IIS Manager and then select and open "Handler Mappings" at the server level:</p>
<p style="font-weight: normal; "><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00495/handler-mappings.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="685" hspace="0" vspace="0" width="912"></p>
<p><span style="font-weight: normal;">Select the "</span>Add Module Mapping<span style="font-weight: normal;">" action and specify the configurations settings as below:</span></p>
<p style="font-weight: normal; "><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00495/module-mapping.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="683" hspace="0" vspace="0" width="912"><br></p>
<h2 style="font-weight: normal; "></h2>
<h2 style="font-weight: normal; "><ul><li><span style="font-weight: normal; line-height: normal;">Request path: </span><span style="line-height: normal;">*.php</span></li><li><span style="font-weight: normal; line-height: normal;">Module: </span><span style="line-height: normal;">FastCgiModule</span></li><li><span style="font-weight: normal; line-height: normal;">Executable: </span><span style="line-height: normal;">"C:\PHP\php-cgi.exe"</span></li><li><span style="font-weight: normal; line-height: normal;">Name: </span><span style="line-height: normal;">PHP via FastCGI</span></li></ul></h2>
<p style="font-weight: normal; "></p>
<div class="info" style="font-weight: normal; ">
<div class="infoHeader">Note</div>
<div class="infoContent">
<p>If you do not see "FastCgiModule" in the "Modules:" drop-down list then it means that the module is not registered or not enabled. To check if FastCGI module is registered open the IIS configuration file %WINDIR%\windows\system32\config\applicationHost.config and check that the following line is present in &lt;globalModules&gt; section:</p>
<p></p>
<div class="preformatted">
<div class="preformattedContent"><font face="Arial, Helvetica, sans-serif"><span style="line-height: 16px;">&lt;add name="FastCgiModule" image="%windir%\System32\inetsrv\iisfcgi.dll" /&gt;</span></font></div>
</div>
<p>Also, in the same file, check that the FastCGI module is added to the &lt;modules&gt; section:</p>
<p></p>
<div class="preformatted">
<div class="preformattedContent"><font face="Arial, Helvetica, sans-serif"><span style="line-height: 16px;">&lt;add name="FastCgiModule" /&gt;</span></font></div></div>
<p></p>
<p></p>
</div></div>
<p style="font-weight: normal; "></p>
<p style="font-weight: normal; "><span style="font-weight: normal;">Click OK. A dialog box appears asking if you want to create a FastCGI application for this executable. Click Yes.</span></p>
<p style="font-weight: normal; "><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00495/confirmation.jpg" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="163" hspace="0" vspace="0" width="411"></p></font></div></span></div></h2></div><div><div><font color="#000000" face="Arial, Helvetica, sans-serif">
<h2 style="color: rgb(91, 91, 91); font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; "><a name="performance" ></a>Setting FastCGI Configuration for Optimal Performance</h2>
<p style="color: rgb(91, 91, 91); font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; ">Watch this short video to learn how to setup optimal performance for FastCGI</p>
<p>Ensure that the <a href="http://www.iis.net/download/AdministrationPack" target="_blank" rel="nofollow">Administration Pack for IIS 7</a> is installed on your server! If not - please install it, <b>otherwise you wouldn't see the option for configuring FastCGI settings</b>!</p>
<p style="color: rgb(91, 91, 91); font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; "><a href="#" onclick="window.open('http://web-site-scripts.com/knowledge-base/pages/fascgi-timeouts-iis7.html', 'videotour', 'scrollbars=0,resizable=0,width=1135,height=738');return false;"><img style="border-width: 1px; margin: 0px;" title="Take the KnowledgeBase Manager Pro Video Tour" alt="Take the KnowledgeBase Manager Pro Video Tour" src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00495/fastcgi-performance.png" align="" border="1" height="238" hspace="0" vspace="0" width="376"></a></p>
<h1 style="color: rgb(91, 91, 91); font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; "><span style="font-size: 18px;"><a name="default-document" ></a><font size="6"><span style="font-size: 24px;">Configure default document in IIS</span></font></span></h1>
<h2 style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 5px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; font-size: 18px; line-height: normal; color: rgb(91, 91, 91); font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; "></h2>

<p style="color: rgb(91, 91, 91); font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; ">Most of the PHP applications use a file named index.php as the default application document. Configure IIS to treat this file as the default content page:</p>
<p style="color: rgb(91, 91, 91); font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; "></p>
<ol style="color: rgb(91, 91, 91); font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif; font-size: 13px; line-height: normal; "><li>Open IIS Manager and then select and open "Default Document" at the server level:<br><br><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00495/default-document.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="728" hspace="0" vspace="0" width="960"><br><br></li><li>Click "Add..." and enter "index.php".<br><br><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00495/add-default-document.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="728" hspace="0" vspace="0" width="962"></li></ol></font></div></div></div>
<h1><a name="testing" ></a>Testing PHP CGI</h1>
<p>After installing the FastCGI extension, and registering and configuring the PHP CGI, you&nbsp;can use KMP normally.</p>
<p>Restart the IIS server to apply all changes that you've made.</p>
<p></p>
<p>To test, create and request an info.php page in your site that contains the following:</p>
<p></p>
<div class="preformatted">
<div class="preformattedContent"><div class="preformattedContent">&lt;?php<br>phpinfo();<br>?&gt;</div></div>
</div>
<p>You see something like:&nbsp;</p>
<p></p>
<p><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00491/phpinfo.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="596" hspace="0" vspace="0" width="668"><br></p>
<p>Note that the <b>Server API</b> indicates that PHP is hosted in FastCGI mode.</p>
<p></p>
<div class="info">
<div class="infoHeader">Information Box Title</div>
<div class="infoContent">
<p>Default settings of IIS7 conflict with filename escaping methods used in KMP for attachments and images that contain a whitespace in their names. <a href="ARTICLE_URL#453##AA-00492#" target="">Check this this guide to set correct option</a> and you &nbsp;won't run into such issue in future.</p>
</div>
</div>
<p><br></p>
<br>
<p></p>
<p></p>
]]></description>
                                    <pubDate>Wed, 24 Feb 2010 08:49:03 +0000</pubDate>
                                    <guid>http://www.web-site-scripts.com/knowledge-base/article/AA-00495</guid>
                    </item>
                <item>
                        <title>PHP installation on IIS6</title>
                                    <link>http://www.web-site-scripts.com/knowledge-base/article/AA-00491</link>
                                    <description><![CDATA[<p>This guide describes installation of PHP with FastCGI on IIS6 server.</p>
<p>We <b>strongly recommend</b> you to use the latest version of PHP (v5.3 or higher). Earlier versions of PHP for Windows have&nbsp;<a href="http://bugs.php.net/bug.php?id=44994" target="_blank" rel="nofollow">bugs</a>&nbsp;and may freeze when launch external programs (e.g. attachment indexation plugins) using Windows command line.</p><p>Actual PHP versions work with IIS via FastCGI interface. We will explain how to install FastCGI and configure it to work with PHP.</p>
<p><span style="border-collapse: collapse;"></span></p>
<p></p>
<ul><li><span style="line-height: 16px;"><a href="#install-fcgi" target="">Installing the FastCGI Extension for IIS 6.0</a></span></li><li><span style="line-height: 16px;"><a href="#install-php" target="">Downloading and Installing PHP</a></span></li><li><span style="line-height: 16px;"><a href="#conf-fcgi" target="">Manually Configuring FastCGI Extension to Work with PHP</a></span></li><ul><li><span style="line-height: 16px;"><a href="#create-mapping" target="">Create script mapping</a></span></li><li><span style="line-height: 16px;"><a href="#modify-fcgiext" target="">Modify fcigext.ini file</a></span></li><li><span style="line-height: 16px;"><a href="#def-doc" target="">Configure default document in IIS</a></span></li><li><span style="line-height: 16px;"><a href="#optimal-config" target="">Setting FastCGI Configuration for Optimal Functionality, Security and Performance with PHP</a></span></li></ul><li><span style="line-height: 16px;"><a href="#testing" target="">Testing PHP CGI</a></span></li></ul>
<p></p>
<p></p>
<h1><a name="install-fcgi" ></a>Installing the FastCGI Extension for IIS 6.0</h1>
<p>The FastCGI extension for 32bit and 64bit Windows XP and Windows Server 2003 can be <a href="http://www.iis.net/extensions/fastcgi" target="_blank" rel="nofollow">downloaded from the official Microsoft website</a>.</p>
<p></p>
<p>When you run FastCGI installer, it copies FastCGI specific files to "%WINDIR%\system32\inetsrv" folder (e.g. "C:\Windows\system32\inetsrv\") and then registers and enables FastCGI Web Server Extension. Out of the files that the installer copies, be aware of the following:</p>
<p></p>
<ul><li><span style="line-height: 16px;"><b>fcgiext.dll</b> – This is the actual FastCGI handler that communicates with FastCGI enabled processes for processing requests</span></li><li><span style="line-height: 16px;"><b>fcgiext.ini</b> – This is the configuration file that contains mapping of file extensions to FastCGI processes. It also contains the configuration of FastCGI process pools.</span></li></ul>
<p></p>
<p></p>
<h1><a name="install-php" ></a>Downloading and Installing PHP</h1>
<p></p>
<ol><li><a href="http://windows.php.net/download/" target="_blank" rel="nofollow">Download the latest PHP package for Windows</a>&nbsp;<br>You need PHP v5.3 or higher. Choose ZIP package <b>VC9 x86 Non Thread Safe</b>.<br><div class="attention">
<div class="attentionHeader">MSSQL<br></div>
<div class="attentionContent">
<p>
If you're planning to use MSSQL as a database server, be sure download PHP v5.3.* (not v5.4.*!) as SQL drivers for PHP that work on IIS6 are available only for v5.3.* family. PHP v5.4.* drivers for SQL doesn't work on IIS6.</p><p>If your database is MySQL you can use PHP v5.4.* without any restrictions.</p></div></div><span style="color: rgb(51, 102, 0); font-weight: bold;"></span></li><li>Extract the contents of PHP zip package to a folder on your server, e.g. <b>C:\PHP\</b></li><li>Make a copy of the&nbsp;<b>php.ini-production</b> file and name it <b>php.ini</b></li><li>Open the <b>php.ini</b> and setup the following parameters. Every parameter already exists in the php.ini and you just need to find it, uncomment (by removing ";" character from the beginning of the line), and change its value. Make sure that you do not have one of these options specified twice in the php.ini file.<br><div class="preformatted">
<div class="preformattedContent"><div class="preformattedContent">
<p>memory_limit = -1<br>post_max_size = 128M<br>extension_dir = "C:\PHP\ext"<br>upload_tmp_dir = "C:\PHP\upload"<br>upload_max_filesize = 128M</p>
<p></p>
<p>max_execution_time = 600<br>max_input_time = 600<br>max_input_vars = 2000</p>
<p>extension=php_curl.dll<br>extension=php_mbstring.dll<br>extension=php_exif.dll<br>extension=php_gd2.dll<br>extension=php_ldap.dll<br>extension=php_mysqli.dll<br><br>session.save_path = "C:\PHP\session"</p><p>session.use_cookies = 1</p>
<p>fastcgi.impersonate = 1<br>cgi.fix_pathinfo = 1<br>cgi.force_redirect = 0<br></p>
<p></p>
</div></div></div><div class="attention">
<div class="attentionHeader">Extensions Loading Order<br></div>
<div class="attentionContent">
<p>
It is required to load "php_mbstring.dll" extension <b>before</b> "php_exif.dll". Make sure that order of these two extensions in your php.ini is the same as shown above.</p>
</div></div></li><li>Create "<b>upload</b>" and "<b>session</b>" sub-directories in the C:\PHP\ directory. You can use different names, just make sure that they match&nbsp;<span style="font-family: Courier; line-height: 13px;">upload_tmp_dir<font face="Arial, Helvetica, sans-serif"><span style="line-height: 16px;">&nbsp;and&nbsp;</span></font>session.save_path</span> parameters that you've set in the php.ini.&nbsp;</li><li>Setup <b>date.timezone</b> parameter in php.ini, for example:<br><div class="preformatted">
<div class="preformattedContent">
date.timezone = "America/New_York"<br></div>
</div>
<p>Chose your city or at least a city from your time zone.</p>
You can find the <a href="http://php.net/manual/en/timezones.php" target="_blank" rel="nofollow">full list of possible date.timezone values on PHP.net website</a>.<br><br></li><li>Save the php.ini.</li><li>To test if the PHP installation is successful, run the following from the command line prompt:<br><div class="preformatted">
<div class="preformattedContent">C:\PHP&gt;php -info</div></div><br>
<div class="info"><div class="infoHeader">If PHP Fails to Start</div><div class="infoContent">
<p>
VC9 Versions are compiled with the Visual Studio 2008 compiler and have improvements in performance and stability. The VC9 versions require you to have the&nbsp;<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF" target="_blank" rel="nofollow">Microsoft 2008 C++ Runtime (x86)</a>&nbsp;&nbsp;or the&nbsp;<a href="http://www.microsoft.com/downloads/details.aspx?familyid=bd2a6171-e2d6-4230-b809-9a8d7548c1b6&amp;displaylang=en" target="_blank" rel="nofollow">Microsoft 2008 C++ Runtime (x64)</a>&nbsp;&nbsp;installed. You may need to download these extensions on old versions of Windows if PHP is unable to start.</p>
</div></div></li></ol>
<h1><a name="conf-fcgi" ></a>Manually Configuring FastCGI Extension to Work with PHP</h1>
<p>To manually configure the IIS and FastCGI extension, you&nbsp;must create script mappings for the PHP extension in the IIS metabase and modify fcgiext.ini file located in %WINDIR%\system32\inetsrv.</p>
<h2><a name="create-mapping" ></a>Create script mapping</h2>
<p></p>
<div><span style="font-family: Tahoma,Verdana,Helvetica,Arial,sans-serif; line-height: normal; font-size: 13px; color: rgb(91, 91, 91);"><div><ol><li><span style="color: rgb(0, 0, 0); font-family: Arial,Helvetica,sans-serif; line-height: 16px;">Launch inetmgr.exe.</span></li><li><span style="color: rgb(0, 0, 0); font-family: Arial,Helvetica,sans-serif; line-height: 16px;">Double click the machine icon for the local computer.</span></li><li><span style="color: rgb(0, 0, 0); font-family: Arial,Helvetica,sans-serif; line-height: 16px;">Right click on "Web Sites" and pick "Properties."</span></li><li><span style="color: rgb(0, 0, 0); font-family: Arial,Helvetica,sans-serif; line-height: 16px;">Click the "Home Directory" tab.&nbsp;</span></li><li><span style="color: rgb(0, 0, 0); font-family: Arial,Helvetica,sans-serif; line-height: 16px;">Click the "Configuration…" button.</span></li><li><span style="color: rgb(0, 0, 0); font-family: Arial,Helvetica,sans-serif; line-height: 16px;">Click the "Add…" button.</span></li><li><span style="color: rgb(0, 0, 0); font-family: Arial,Helvetica,sans-serif; line-height: 16px;">Browse to the fcgiext.dll located in %WINDIR%\system32\inetsrv.<br>Note:&nbsp;If you need to use FastCGI in 32 bit mode on a&nbsp;64 bit machine, then browse to %WINDIR%\SysWOW64\inetsrv.</span></li><li><span style="color: rgb(0, 0, 0); font-family: Arial,Helvetica,sans-serif; line-height: 16px;">Enter .php as the Extension.</span></li><li><span style="color: rgb(0, 0, 0); font-family: Arial,Helvetica,sans-serif; line-height: 16px;">Enter Verbs as GET,HEAD,POST .</span></li><li><span style="color: rgb(0, 0, 0); font-family: Arial,Helvetica,sans-serif; line-height: 16px;">Ensure that "Script Engine" and "Verify that file exists" are checked.<br><br><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00491/fastcgi.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="247" hspace="0" vspace="0" width="433"><br><br></span></li><li><span style="color: rgb(0, 0, 0); font-family: Arial,Helvetica,sans-serif; line-height: 16px;">Click OK</span></li></ol>
<h2><a name="modify-fcgiext" ></a>Modify fcigext.ini file</h2>
<p>Once the script mapping is added, modify the fcgiext.ini file:</p>
<ol><li>Add an extension to application mapping (php=PHP) to the [Types] section.</li><li>Add [PHP] section with ExePath=c:\php\php-cgi.exe (assuming you installed PHP files to C:\PHP folder).<br></li></ol><div class="preformatted"><div class="preformattedContent">
<p>[Types]</p>
<p>php=PHP</p>
<p><br></p>
<p>[PHP]</p>
<p>ExePath=c:\php\php-cgi.exe</p>
<p></p>
<p>RequestTimeout=600</p>
<p>ActivityTimeout=900</p>
<p></p>
</div></div>
<p>After all the changes to fcgiext.ini the file are saved, restart the web server.</p>
<h2><a name="def-doc" ></a>Configure default document in IIS</h2>
<p>Most of the PHP applications use a file named index.php as the default application document. Configure IIS to treat this file as the default content page:</p>
<ol><li>Launch inetmgr.exe.</li><li>Double click the machine icon for the local computer.</li><li>Right click "Web Sites" and pick "Properties."</li><li>Click&nbsp;the "Documents" tab.</li><li>Click the "Add…" button and enter "index.php" for "Default Document Name:"&nbsp;</li><li>Click "OK."<br><br><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00491/default-doc.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="465" hspace="0" vspace="0" width="659"></li></ol>
<h1><a name="testing" ></a>Testing PHP CGI</h1>
<p>After installing the FastCGI extension, and registering and configuring the PHP CGI, you&nbsp;can use KMP normally.</p>
<p>Restart the IIS server to apply all changes that you've made.</p>
<p></p>
<p>To test, create and request an info.php page in your site that contains the following:</p>
<p></p>
<div class="preformatted">
<div class="preformattedContent"><div class="preformattedContent">&lt;?php<br>phpinfo();<br>?&gt;</div></div>
</div>
<p>You see something like:&nbsp;</p>
<p></p>
<p><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00491/phpinfo.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="596" hspace="0" vspace="0" width="668"><br></p>
<p>Note that the <b>Server API</b> indicates that PHP is hosted in FastCGI mode.</p>
<p></p>
</div></span></div>]]></description>
                                    <pubDate>Wed, 17 Feb 2010 19:02:18 +0000</pubDate>
                                    <guid>http://www.web-site-scripts.com/knowledge-base/article/AA-00491</guid>
                    </item>
                
    </channel>
</rss>