Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know PHP4 is no longer in use, but a pretty large custom script, that requires it, works perfectly fine. So there is no point in fixing something that's not broken. I have a PHP 5 script that I want to run under a sub folder I tried both AddHandler's below (not active at the same time) in a .htaccess file and nothing works. The main webroot .htaccess file is set to PHP 4, but I can't get it to turn off PHP 4 and have it default back to 5.2 on specific sub folders.

AddHandler application/x-httpd-php52s .php .php5 .php4 .php3 .html .tpl .htm 
AddHandler application/x-httpd-php52 .php .php5 .php4 .php3  .html .tpl .htm
share|improve this question
What about using SetHandler or a combination of RemoveHandler/AddHandler? – fission Jul 25 '11 at 5:12

Your Answer


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

Browse other questions tagged or ask your own question.