With the help of this steps you can manually install PHP on
Windows VPS as well as on a
Dedicated servers.For installing PHP on a
Windows server you must have some knowledge of Plesk control panel.
1) First you will need to login to your Windows VPS or a Dedicated server and after that browse to php download page. Please remeber to download PHP 4.4.2 zip package and not the installer.
Note:Download ISAPI/NSAPI binaries (11/03/2002).
2) Once you finish that, create a folder named PHP in C:\ and unzip php4.4.2 archive into C:\PHP\. After that, copy "php4ts.dll" from C:\PHP\ (not cut/paste, just copy) to C:\Windows\System32\
3) Now unzip the FastCGI binary and copy isapi_fcgi.dll into C:\PHP\
4)After that you will require to add PATH for PHP.
right-click My Computer -> Properties -> Advanced tab -> Environment Variables -> double-click the Path variable in the list of System variables.
At the end of the string add this:
;C:\PHP
do not put ; in front of C:\PHP if there is already one there. It should not look as ;;C:\PHP.
Now, you can run PHP as ISAPI or CGI. Here is how you do it for both cases:
----------------------------
running PHP as ISAPI
----------------------------
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" (without the quotes), click 'Add...' button and select isapi_fcgi.dll in C:\PHP. Check 'Set extension status to Allowed' and click OK.
Now add .php extension so that IIS can serve .php files: 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... endless OK clicking. Once you're out, 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 once again.
Open the Windows registry (Start -> Run -> 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:\PHP\php.exe".
Right-click on ".php", select "New", "String Value" and type "BindPath". Double-click on this new value and type "php-fcgi".
Close the registry.
Rename C:\PHP\php.ini-recommended to php.ini and move it to C:\Windows\
Then open php.ini and locate "extension_dir" (CTRL+F). Make it like this:
extension_dir = "C:\PHP\extensions"
Save and restart IIS.
-------------------------
running PHP 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 Windows registry (Start -> Run -> 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:\PHP\php.exe".
Right-click on ".php", select "New", "String Value" and type "BindPath". Double-click on this new value and type "php-fcgi".
Close the registry.
Rename C:\PHP\php.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:\PHP\extensions"
Make sure that you disable force redirect, otherwise CGI won't work. To do so, find cgi.force_redirect (CTRL+F) and make it look like this:
cgi.force_redirect = 0
Save and restart IIS.
--------------------------------------------
Create a new file in c:\Inetpub\wwwroot called test.php and put in it. Load it in IE like
http://localhost/test.php and you should see PHP output.
There you go, you have manually installed PHP on Windows.