December 18, 2009

How to install PHP 5.0 on Helm

Please refer the following steps to install PHP 5.0 if customer has HELM or doesn’t have control panel at all.

Download zip package (NOT the installer): [url]www.php.net/get/php-5.0.5-Wi…p/from/a/mirror[/url]

Download PECL modules for PHP 5.05: [url]www.php.net/get/pecl-5.0.5-W…p/from/a/mirror[/url] (more extensions)

Unzip php-5.0.5-Win32.zip and place it in C:\PHP (it’s very important that you place it here due to php.ini).

Unzip pecl-5.0.5-Win32.zip and put it in C:\PHP\ext

Go to C:\PHP and create a new text file. Then save the attached file and rename it to php.ini.

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

Click ok ok ok ok and reboot the server..

Then create a txt file on Desktop and paste this into it:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\PHP]
“IniFilePath”=”C:\PHP”

then rename the file to inifilepath.reg, double-click it and click yes. Now it’s added in Registry.

That part is configured, now you only need to set it in IIS:

Open it, 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 php5isapi.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 php5isapi.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.

Restart IIS and test if everything is working properly. Under some site, create a txt file and add:

Rename it to test.php and load it from your browser. If it’s showing PHP info, then it’s good.

No comments:

Post a Comment