Red Hat Bugzilla – Bug 9940
php2 should have a .php2 extension and php3 should be .phtml
Last modified: 2008-05-01 11:37:54 EDT
I've been bothered over the last year that the default httpd.conf file in
the apache rpms from Redhat use .php3 as the default extention for php3
files and .phtml as the extention for php2. I've always thought that
.phtml(or maybe just .php) was the more logical choice for what represents
"current" version php files.
Since php3 and php4 are syntatically compatible as far as I can tell it
would make migrating pages to php4 much easier. If we keep on using
.php<version-number> as the default extension name, it will be more
difficult to make upgrades.
So I think that instead the following directives should be used:
# For PHP3 and up.
AddType application/x-httpd-php3 .phtml
AddType application/x-httpd-php3-source .phps
# The following is for PHP/FI (PHP2):
AddType application/x-httpd-php .php2
This is the way the PHP team does it. It might seem like a good idea to change
it, but changing this would make our setup incompatible with just about every
piece of documentation out there (the FAQ at http://www.php.net/FAQ.php3, to
name just one example).