[php-maint] Bug#473126: php5-common: improve details in README.Debian for php5-cgi and apache2
Olivier Berger
olivier.berger at it-sudparis.eu
Fri Mar 28 13:59:04 UTC 2008
Package: php5-common
Version: 5.2.5-3
Severity: minor
Hi.
in README.Debian.gz (php5-common), I read :
=======================================
php5-cgi and apache2
---------------------------
In 99% of cases, what you probably want isn't php5-cgi at all, but rather
the libapache2-mod-php5 package, which will configure themselves on
installation and Just Work(tm). If, however, you have a need to use
the CGI version of php5 with apache2, the following should help
get you going, though there are dozens of different ways to do this.
Please note that this process will never be made automatic, as php5-cgi
is meant to be a webserver-agnostic package that can be used with any
httpd, and we don't want it to conflict with the httpd-specific packages
such as libapache2-mod-php5. If both were installed side-by-side and both
were automatically enabled, the results would be a bit confusing, obviously.
To use php5-cgi with apache2
1) activate CGI (it's on by default in default debian setups)
a) If using the prefork MPM, use 'a2enmod cgi'
b) If using a threaded MPM, use 'a2enmod cgid'
2) activate mod_actions (a2enmod actions)
3) Add the following to a config snippet in /etc/apache2/conf.d
<IfModule mod_actions.c>
Action application/x-httpd-php /cgi-bin/php5
</IfModule>
=======================================
Concerning the last directives I have the feeling that it may be advised
to modify /etc/apache2/mods-enabled/actions.conf, as suggested by the
message returned by a2enmod actions instead of /etc/apache2/conf.d files.
Then, the docs could be :
2) activate mod_actions (a2enmod actions)
3) Add the following to /etc/apache2/mods-enabled/actions.conf
Action application/x-httpd-php /cgi-bin/php5
4) Reload apache's configuration (/etc/init.d/apache2 force-reload)
Hope this helps,
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.22-3-vserver-686 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages php5-common depends on:
ii libc6 2.7-6 GNU C Library: Shared libraries
ii sed 4.1.5-6 The GNU sed stream editor
php5-common recommends no packages.
-- no debconf information
More information about the pkg-php-maint
mailing list