How to Enable PHP5
From ReduxWiki
Contents |
There are two different ways of adding a handler rule to parse .php files with the PHP5 engine. You may either use cPanel or add the rule manually into your .htaccess file.
[edit] cPanel
This method will set up a site-wide rule for handling .php files with the PHP5 engine. If you need a directory by directory set-up, please see the manual way of handling .php files.
Log into cPanel and open the control panel for Apache Handlers by clicking the Apache Handlers icon
On the Apache Handlers control panel screen enter the following information:
- In the Extension(s) text box, enter
.php. - In the Handler text box, enter
application/x-httpd-php5 - Click the Add button
The new handler rule should appear under the list of User Defined Handlers.
[edit] Manually
Access your .htaccess file under your main directory (usually public_html) and either type or copy and paste the following rule:
AddHandler application/x-httpd-php5 .php
You only need to add this to the .htaccess file in your main directory if you would like .php files to be parsed by the PHP5 engine throughout your entire site. If, for some reason, you would like .php files to be parsed on a directory by directory basis, you must add a .htaccess file to each directory containing the above line of code.
Categories: Apache | PHP | Control Panels | CPanel | WHM | Network Redux Services


