PHP 4 or PHP 5? You Pick the Flavor

Posted by: jzelazny | No Comments »

Categorized: Hints, HOWTOs, Web Development

I recently ran into a situation where there were two versions of PHP on a server and I needed to make sure PHP 5 was being used. To pick the version – all you need to do is add the following into your .htaccess file (assuming you do not have access to your httpd config):

For PHP 5:
AddType application/x-httpd-php5 .php

For PHP 4:
AddType application/x-httpd-php4 .php

It does not get much more easier than that!

Tagged: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>