parsing html with php5.4 and php-fpm

comnfo

Verified User
Joined
Aug 22, 2011
Messages
9
Hi. Can someone point me to the right direction? I am getting a blank page when trying to parse html with php. The page will display if i change the file extension from html to php.

I add this to .htaccess

<FilesMatch "\.(inc|php|php3|php4|php44|php5|php52|php53|php54|phtml|phps)$">
AddHandler x-httpd-php54 .php
</FilesMatch>

and also tried
AddHandler application/x-httpd-php .htm .html .php
AddHandler application/x-httpd-php5 .htm .html .php
AddHandler application/x-httpd-php54 .htm .html .php

and added .html .htm to security.limit_extensions in php-fpm.conf

not sure what else to check. Any suggestions? Thanks.

custombuild 2.0 with apache 2.4 php5.4 with php-fpm
 
Hello,

Try this:

Code:
<FilesMatch "\.(inc|php|php3|php4|php44|php5|php52|php53|php54|phtml|phps|html|htm)$">
 AddHandler x-httpd-php54 .php .html .htm .phtm
 </FilesMatch>


or whatever it should be sure in place of x-httpd-php54 (you should specify it correctly)
 
thanks for info but it did not work, still a blank page. i changed to fastcgi and same result. anything else i need to check for it to work with fastcgi instead?

i tried this in .htaccess

<FilesMatch "\.(inc|php|php3|php4|php44|php5|php52|php53|php54|phtml|phps|html|htm)$">
AddHandler fastcgi .php .html .htm .phtm
</FilesMatch>
 
the only time I had seen this (and was on apache 2.2.x with php 5.2.17 iirc) adding
AddType application/x-httpd-php .html
to htaccess worked for me.
I eventually added to httpd.conf and removed from htaccess.

not sure if that helps due to older version.
 
Back
Top