Configuring Apache to process .php5 files
I have an Apache 2 with PHP 5 (module) running locally for development. It works just fine, but my webhoster requires PHP 5 files to have the extension .php5 (.php files being interpreted as PHP 4 :rolleyes: ). Unfortunately, I have not been able to tweak my Apache to correctly process those files. I have the line
AddType application/x-httpd-php .php .php3 .php4 .php5 in my httpd.conf, but no luck - instead of to the PHP interpreter, .php5 files are sent straight to the browser, resulting in a download dialog :mad: Any help on fixing this would be appreciated, as I'm not keen on keeping my files as .php and having to rename them to .php5 every time I want to upload them. |
Did you restart apache after making your changes? You may also need to add something like index.php5 in your DirectoryIndex section of your httpd.conf.
|
I did, but it doesn't work nonetheless. :(
|
Quote:
But anyway, why don't you just keep your local files as *.php if it is working, and simply rename them when you upload to your webhost? |
Yes, I am sure. Other changes I've made in the same file have worked before.
Just noticed something strange. When I open a .php5 file in Firefox, the download prompt says, "You have chosen to open [filename].php5, which is a: PHP5 file". Whereas, if I open a directory with an index.php5 in it, it says, "You have chosen to open [empty string], which is a: application/x-httpd-php". That would mean the MIME type is recognized only in the second case. Neither file is interpreted as it should, however. And I don't want to go the renaming route because it's a pain :( |
All times are GMT -5. The time now is 05:32 AM. |