PHP CGI on per-directory basis
Posted by: kchrist
Posted on: 2005-09-21 10:43:00
How can I run PHP as CGI on a per-directory basis while keeping it running as an Apache module for the rest of a site?
I normally prefer using mod_php over CGI, so I've never actually had to do this before, but I've now got a situation where I need CGI for one particular application. Converting the entire domain to CGI will break my existing code. The following, in .htaccess in the directory in question, has no effect; phpinfo() still reports that the server API is Apache, not CGI:
RemoveHandler .php
AddHandler cgi-script .php
Thanks.