Hi there,

>> As an httpd user who's reading this proposal: Currently, I like to
>> configure PHP in combination with Apache in such a way that I set the
>> content type and then have Action application/x-httpd-php ... I don't
>> want to use AddHandler, since then Apache also processes files ending
>> in .php.txt with PHP, so the usage of the content type as handler has
>> been very useful to me. (Btw. this is PHP as CGI/FastCGI, hence the
>> Action statement.)
> 
> Thanks for the feedback, can you show an example stanza? Curious how
> you set the type in contrast of AddHandler

extract from my httpd configuration (still 2.2, I should probably
upgrade soon...):

-----------------------------------------------------------------
# FastCGI configuration (abbreviated)
LoadModule fcgid_module modules/mod_fcgid.so
<Location /fcgi-bin/>
  SetHandler fcgid-script
  Options +ExecCGI
  Order allow,deny
  Allow from all
</Location>
Alias /fcgi-bin/ /srv/www/fcgi-bin/

# /srv/www/fcgi-bin/php-fcgi-wrapper:
#     (shell script because of suexec; immutable fs attribute set)
#!/bin/sh
exec /usr/bin/php-cgi "$@"

# PHP configuration
AddType application/x-httpd-php .php
Action application/x-httpd-php /fcgi-bin/php-fcgi-wrapper
-----------------------------------------------------------------

That has worked for me since at least some later version of Apache 2.0.
Has the advantage of having the same semantics as mod_php when it comes
to resolving whether a PHP file should be called or not.

-- Christian

Reply via email to