You are Here: FAQ ->Scripting and Programming Languages->PHP->Article #6


How to parse .php files as PHP 4


By default .php files are parsed as PHP 4 on 1&1 servers.

All files ending in .php3, .php4 and .php are handled by PHP 4.
All files ending in .php5 are handled by PHP 5.

However there are still a lot of .php3 scripts out there which don't work. What
you need to do is either create a new .htaccess file or edit an existing one.

Create a ".htaccess" file containing the following line:
AddType x-mapp-php4 .php3

Upload this file into into the root of your domain. The changes take effect
immediately. This will tell Apache to use PHP 4 instead of PHP 3 for the
extension .php3 in the directory the .htaccess is placed and all sub-directories
under it.

If you prefer that all files be parsed as PHP 5, please create or change
the .htaccess file with the following line:

AddType x-mapp-php5 .php


Print Article
How useful was this article?
(From 5 = Very Useful to 1 = Not useful at all):
1 2 3 4 5