Bug#239364: apache: Suexec incompatible with php4-cgi
Package: apache
Version: 1.3.29.0.2-4
Severity: normal
suexec refuses to work with php4-cgi for two reasons:
- /usr/lib/cgi-bin/php4 is outside suexec's /var/www docroot. Suexec
has to be recompiled with a different docroot or be patched to
remove the docroot check (see bug #83602).
- suexec checks that php4 is owned by $user.$group as defined in the
Apache virtualhost but php4 is owned by root.root.
Two solutions:
- make one $user.$group owned copy the php4 binary into each
virtualhost cgi-bin/ directory (ugly)
- patch suexec to remove the user and group checks.
My Apache configuration is the Debian default with suexec enabled plus
mod_action enabled plus "Action application/x-httpd-php /cgi-bin/php4"
as adviced by /usr/share/doc/php4-cgi/README.Debian plus a basic
VirtualHost with user/group directives:
LoadModule action_module /usr/lib/apache/1.3/mod_actions.so
<Directory /var/www/cyb/>
Options +ExecCGI
AddType application/x-httpd-php .php
Action application/x-httpd-php /cgi-bin/php4
</Directory>
NameVirtualHost *
<VirtualHost *>
ServerName cyb
DocumentRoot /var/www/cyb
User cyb
Group cyb
</VirtualHost>
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.3-1-686
Locale: LANG=C, LC_CTYPE=C
Versions of packages apache depends on:
ii apache-common 1.3.29.0.2-4 Support files for all Apache webse
ii debconf 1.4.16 Debian configuration management sy
ii dpkg 1.10.20 Package maintenance system for Deb
ii libc6 2.3.2.ds1-11 GNU C Library: Shared libraries an
ii libdb4.2 4.2.52-15 Berkeley v4.2 Database Libraries [
ii libexpat1 1.95.6-8 XML parsing C library - runtime li
ii libmagic1 4.07-2 File type determination library us
ii libpam0g 0.76-15 Pluggable Authentication Modules l
ii logrotate 3.6.5-2 Log rotation utility
ii mime-support 3.26-1 MIME files 'mime.types' & 'mailcap
ii perl 5.8.3-2 Larry Wall's Practical Extraction
-- debconf information excluded
Reply to: