Forum
.htaccess to run PHP in HTML pages - stopped working
Hi
I've been happily using .htaccess to tell the server to run PHP in HTML pages with:
AddType application/x-httpd-php .php .htm .html
But all my sites have just moved to a new server (which does allow .htaccess) and the behaviour has changed: the .htaccess causes the html page to download rather than render.
Some of my sites run Perch in PHP pages and those sites aren't affected but I have a couple that use the htaccess to run the PHP in html pages and they are all behaving in this way.
Any suggestions please? thank you!
Diagnostic report:
Perch: 2.8.34, PHP: 5.4.16, MySQL: 5.5.52-MariaDB, with PDO
Server OS: Linux, fpm-fcgi
Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34)
App runtimes: <?php $apps_list = array( 'content', 'categories', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/www/vhosts/whitefieldrc.org/httpdocs/perch
PERCH_CORE: /var/www/vhosts/whitefieldrc.org/httpdocs/perch/core
PERCH_RESFILEPATH: /var/www/vhosts/whitefieldrc.org/httpdocs/perch/resources
Image manipulation: GD
PHP limits: Max upload 2M, Max POST 8M, Memory: 128M, Total max file upload: 2M
F1: 6a33f95eca3667f9e0c39bf5ca2980fe
Resource folder writeable: Yes
HTTP_HOST: whitefieldrc.org
DOCUMENT_ROOT: /var/www/vhosts/whitefieldrc.org/httpdocs
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
[the htaccess on the above example is currently empty as it looks slightly less bad than the pages downloading!]
That's a question to direct to your server admin - they should be able to point you in the right direction.