PHP was Broken (16th January 2010)
All my pages were serving the PHP source code instead of parsing and processing it to serve HTML Still not completely sure how or why this was the case. Here’s the
.htaccess stuff which is now working.
# Process <?php ... ?> as PHP in HTML but not <? ... ?>: AddHandler application/x-httpd-php .html .htm .php AddHandler application/x-httpd-php-source .phps php_value short_open_tag Off # Add character encodings to Content-Type headers: AddType 'text/css; charset=utf-8' .css AddType 'text/html; charset=utf-8' .html .htm .phps AddType image/vnd.microsoft.icon .ico AddType application/rss+xml .rss AddType application/x-xpinstall .xpi AddType application/x-rar-compressed .rar
Same issue but this time I took more care to identify the cause. Here was the original
# Allow <?php ... ?>: # Addhandler application/x-httpd-php .html .htm .php
This setup must have already been present in
http.conf or something! Simply uncommented it:
# Allow <?php ... ?>: Addhandler application/x-httpd-php .html .php
At least it was a simple fix. I removed the
.htm association since I only use that for static files.