Archive for the tag 'custombuild'

Swapping between php versions when using suPHP and CLI with custombuild

If you have both suPHP and CLI installed on your system, but don’t feel like renaming all of your file.php to file.php4 (for example), there is another means to chose between php versions, without requiring to touch your php files.

To force php files to use suPHP (on the assumption your default php version uses CLI) use the following:

<FilesMatch “\.php$”>
AddHandler x-httpd-php5 .php
</FilesMatch>

This last one is on the assumption that php 5 is suPHP and CLI is php4. If php4 was suPHP, then you’d use x-httpd-php4 to force .php files to use suPHP with php 4.

Source: http://directadmin.com/