Product:
Search Type:

How to set .php files to be processed by PHP5

Article ID: 5387 
Last Review: Jun,24 2008
APPLIES TO:
  • Parallels Automation (PEM)

CAUSE

Parallels Operations Automation supports both PHP4 and PHP5 for Linux Shared Hosting - PHP4 as mod_php and PHP5 as CGI.
By default, all .php files are processed by mod_php, and to trigger CGI processing files must be named as .php5.
Renaming files could be inconvenient and one can use a special .htaccess file to switch PHP processing mode to CGI.

RESOLUTION

To enable PHP5 for processing .php files in some directory, put .htaccess file with the following content there:
AddType application/x-httpd-php5 .php
Action php5-cgi-script /cgi-php5/php-cgi
AddHandler php5-cgi-script .php
This file affects nested directories as well.

NOTE: PHP5 support should be enabled on the webspace.
Keywords: php5 cgi

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
*Please type the code you can see.
* - required fields