JaguarPC managed web hosting logo
JaguarPC HomeWeb Hosting ForumHosting client login
Hosting Sales - 1.800.558.5869
Order Web Hosting Now
WEB HOSTING BLOG

« Back to the Blog homepage

Installing PHP 4.4.1 - Windows 2003

Hey everyone,


Here are steps on how to install PHP 4.4.1 – again, this is only if client has Helm or doesn’t have a control panel.


Login to VPS and browse to http://www.php.net/downloads.php. Make sure to download PHP 4.4.1 zip package [8,082Kb] – 31 Oct 2005 and NOT the installer.


Then browse to http://www.caraveo.com/fastcgi/ and dowload ISAPI/NSAPI binaries (11/03/2002).


Extract php4.4.1 archive into C:PHP and then “php4ts.dll” (not cut/paste, just copy) to C:WindowsSystem32


Unzip the FastCGI binary and copy isapi_fcgi.dll into C:PHP


Then we need to add PATH for PHP, right-click My Computer, choose Properties – Advanced tab – Environment Variables – and double-click the Path variable in the list of System variables.


At the end of the string add this:


;C:PHP


IF THERE IS ANYTHING ELSE AFTER C:PHP DO NOT PUT THE ; IN FRONT OF C:PHP – IT CAN NOT LOOK AS ;;C:PHP


This is to configure PHP to work as ISAPI: (to have it as cgi, scroll down)


Open IIS, expand local computer and click on ‘Web Service Extensions’. Click on ‘Add a new Web service extension…’ and for the name type in: PHP ISAPI Extensions, click ‘Add…’ button and select isapi_fcgi.dll in C:PHP. Check ‘Set extension status to Allowed’ and click OK.


Now add .php extension: right-click on ‘Web Sites’ in IIS, then choose Properties and click on Home Directory tab. Click ‘Configuration’, Mappings, click ‘Add’. Browse to isapi_fcgi.dll in C:PHP, click OK, and enter “.php” (without quotes) in the ‘Extension field’. Select ‘Limit to’ button and enter: GET,POST,HEAD


Ok ok ok ok. Right-click on Websites again and choose Properties and then Home directory. Change the “Execute permissions” dropdown to “Scripts only”. Also make sure that the ‘Read’ is checked in permissions you’ll see above. Click OK and select all sites and click ok.


Open the registry (regedit) and do the following:


Locate and expand “HKEY_LOCAL_MACHINE”, right-click on “Software” and select “New”, “Key” and type “FASTCGI”.


Right-click on your new “FASTCGI” key and select “New, “Key” and type “.php”.


Right-click on “.php”, select “New”, “String Value” and type “AppPath”. Double-click on this new value and type “c:PHPphp.exe”.


Right-click on “.php”, select “New”, “String Value” and type “BindPath”. Double-click on this new value and type “php-fcgi”.


Rename C:PHPphp.ini-recommended to php.ini and move to C:Windows


Then open php.ini and locate extension_dir. Make it like this:


extension_dir = “C:PHPextensions”


Save and restart IIS.



This is to configure PHP to work as CGI:


Open IIS, expand local computer and click on ‘Web Service Extensions’. Click on ‘Add a new Web service extension…’ and for the name type in: PHP CGI Extensions, click ‘Add…’ button and select php.exe in C:PHP. Check ‘Set extension status to Allowed’ and click OK.


Now add .php extension: right-click on ‘Web Sites’ in IIS, then choose Properties and click on Home Directory tab. Click ‘Configuration’, Mappings, click ‘Add’. Browse to php.exe in C:PHP, click OK, and enter “.php” (without quotes) in the ‘Extension field’. Select ‘Limit to’ button and enter: GET,POST,HEAD


Ok ok ok ok. Right-click on Websites again and choose Properties and then Home directory. Change the “Execute permissions” dropdown to “Scripts only”. Also make sure that the ‘Read’ is checked in permissions you’ll see above. Click OK and select all sites and click ok.


Open the registry (regedit) and do the following:


Locate and expand “HKEY_LOCAL_MACHINE”, right-click on “Software” and select “New”, “Key” and type “FASTCGI”.


Right-click on your new “FASTCGI” key and select “New, “Key” and type “.php”.


Right-click on “.php”, select “New”, “String Value” and type “AppPath”. Double-click on this new value and type “c:PHPphp.exe”.


Right-click on “.php”, select “New”, “String Value” and type “BindPath”. Double-click on this new value and type “php-fcgi”.


Rename C:PHPphp.ini-recommended to php.ini and move to C:Windows


Then open php.ini and locate extension_dir. Make it like this:


extension_dir = “C:PHPextensions”


MAKE SURE THAT YOU DISABLE FORCE REDIRECT, OTHERWISE CGI WON’T WORK. To do so, find cgi.force_redirect and make it look like this:


cgi.force_redirect = 0


Save and restart IIS.


Create under c:Inetpubwwwroot and load it in IE like http://localhost/test.php for example. It should work.
————


Best regards,

Shane Bewick

Enjoy

Leave a Reply