I’ve installed XAMPP Apache server and put my website into htdocs. I’ve started Apache server. On my website I’ve got files with extension PHP and with extension PHP5.The difference is that when I type in into browser localhost/file.php – I see a parsed website.
But when I type localhost/file.php5 (i have this file on server), than browser asks me if I want to download or open this file. And if I choose open than I see PHP code of file.php5!
I’ve looked into configuration, so:
- I dont have htaccess file
- PHPINFO() shows PHP 5
-
c:\xampp\apache\conf\extra\httpd-xampp is included into configuration and has this on the beginning:
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php .php5 .php4 .php3 .phtml .phpt
I’ve tried also to put:
AddHandler php5-script .php5 AddType text/html .php5
Into httpd.conf, but it does not work for me (no changes).
Could you please help me fixing it? I would like to have php5 and php extension files to be opened with php5 parser.
XAMPP passes by default files with the following extensions to PHP: .php .php5 .php4 .php3 .phtml .phpt (this was tested with XAMPP Lite 1.6.8).
My suggestion would be to remove the ‘AddType text/html .php5’ line from the XAMPP configuration. Alternatively, use a clean install of XAMPP and look at the differences (with something like WinMerge).