I'm trying to replicate a web-site on a test-server. However, on the test-server, .php
files don't get interpreted. I found that the cause is a .htaccess
file in the document root. Its contents:
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
RewriteEngine On
#RewriteRule ^$ index.php [QSA]
RewriteRule ^(.*)$ /web/$1
How do I configure Apache2/PHP5 to support the handler application/x-httpd-php5s
? Is there any software-package which makes this handler available?
Update: It may be a handler specific to Bluehost.com. Am currently investigating this...
Update 2: To avoid having to change the .htaccess
file, which would introduce inconsistencies, I added a handler "application/x-httpd-php5s" to Apache:
AddHandler application/x-httpd-php5s .php
Action application/x-httpd-php5s /cgi-bin/php5
However, that handler will not behave as on the production server, where it causes the PHP interpreter to use a php.ini
in the document root and use it for all subdirectories. A somewhat ugly workaround is, for example, to symlink that php.ini
to the global php.ini
on the test-server.