Many webhosts, such as Mediatemple and ourselves, offer several versions of PHP. Both PHP4 and PHP5 are provided in our case. PHP4 is still the default, so you may get error messages or improper behavior when you run a script written for php5. The solution is simple, just create a .htaccess file in the root of your site (or in a subdirectory if you wish to run different versions on different parts of your site.) with the following line in it:

AddHandler php5-script .php

That will cause all .php files in the scope of the .htaccess to run with the PHP5 interpreter, instead of version 4.

Leave a Comment

CommentLuv Enabled

Anti-Spam Protection by WP-SpamFree