JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050

JaguarPC Blog

Did you know JaguarPC was established in 1998? We are a hosting company providing quality, non-oversold, reliable hosting solutions at an affordable price. Our services are backed by 24/7 professional customer support, stellar hardware, uptime and money back guarantees.

September 17th

Installing PHP 4.4.1 – Windows 2003

By Jag September 17, 20063:11 pm

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 :P HP DO NOT PUT THE ; IN FRONT OF C :P HP – 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

This entry was posted in Control Panels, Windows Hosting. Bookmark the permalink.
No comments

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Follow Us On
    Search your topics
  • Links
    see what is connected with su