Archive for July, 2008

suPHP and .phps PHP code highlighting support

Today a user on one of my web servers asked me why .phps files would only download and not show the highlighted PHP code as expected.

This is usually done by adding the following to your “httpd.conf”…

AddType ‘application/x-httpd-php-source’ .phps

We use the cPanel web hosting control panel and to improve security cPanel recommend using suPHP, which allows PHP scripts to run as a user rather than “nobody”.

This means that adding the above line to “httpd.conf” does not work with suPHP.

So what can be done?

Read the rest of this entry »

Comments (3)