Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

on my Apache/PHP server, file test.php.html is parsed by PHP, while test.html is not. PHPDOC create a lot of *.php.html files, with a XML header wich is a pain for PHP parser, but how to tell Apache not to pass *.php.html file to PHP and just send back the file to browser?

My php.conf file

<IfModule prefork.c>
  LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule worker.c>
  LoadModule php5_module modules/libphp5-zts.so
</IfModule>
AddHandler php5-script .php
AddType text/html .php

What can I do?

Thanks,
Bests regards
Cédric

share|improve this question
    
There appears to be a similar question on stackoverflow that might help you: stackoverflow.com/questions/189780/… –  Michael Apr 3 '10 at 18:45
    
Thanks you, the accepted answer work for me! –  Cédric Girard Apr 6 '10 at 12:08
add comment

2 Answers

Add the following to your Apache configuration or in a ".htaccess" file:

<FilesMatch "\.php\.html$">
    SetHandler None
</FilesMatch>
share|improve this answer
    
Does not work for me, sorry. –  Cédric Girard Apr 6 '10 at 12:07
add comment
up vote 0 down vote accepted

From the accepted answer of http://stackoverflow.com/questions/189780/why-is-apache-executing-php-html-files-as-php

I replaced

AddHandler php5-script .php

by

<FilesMatch \.cgi$>
SetHandler cgi-script
</FilesMatch>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.