Comment 2 for bug 8449

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Thu, 23 Sep 2004 16:10:10 +1000
From: Jarne Cook <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: php4-cgi: No working #! able php binary to go under mass vhosting /cgi-bin

Package: php4-cgi
Version: 4:4.3.8-12
Severity: critical
Justification: breaks unrelated software

What a nasty night I have had. I have figured out that php4-cgi is not
what it appears.

Essentially, neither php4-cli or php4-cgi now provide a
#!/usr/bin/php<something> that can be executed by an executalble script
living in /cgi-bin.

This is because the cgi version (/usr/lib/cgi-bin/php4) has been
compiles with --enable-force-cgi-redirect which means apache has to be
(apprently) setup with
--
Action php-script /cgi-bin/php
AddHandler php-script .php
--

Unfortunately, that isn't going to work when doing complicated vhosts/mod_rewrite
setups.

php/cli on the other hand also can not help as it does not provide GPC
varaibles in a pre-processed way (you would have to manually parse
$_SERVER["QUERY_STRING"]).

So essentially for systems that cant use script alias in their vhost
config and want to use php/cgi in the conventional hash bang method
(aka. the 4th cgi method http://www.php.net/manual/en/security.cgi-bin.shell.php )
will have to have the php package recompiled, as one is not provided.

I see three options from here:
1) contuine to not provide a proper php/cgi binary
2) provide an extra binary in this package (eg /usr/bin/php-cgi)
3) create a new package again with the extra binary.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.6-1-386
Locale: LANG=C, LC_CTYPE=C

Versions of packages php4-cgi depends on:
ii debconf [debconf-2.0] 1.4.30.5 Debian configuration management sy
ii libbz2-1.0 1.0.2-1 A high-quality block-sorting file
ii libc6 2.3.2.ds1-16 GNU C Library: Shared libraries an
ii libdb4.2 4.2.52-17 Berkeley v4.2 Database Libraries [
ii libexpat1 1.95.6-8 XML parsing C library - runtime li
ii libmagic1 4.09-1 File type determination library us
ii libpcre3 4.5-1.1 Perl 5 Compatible Regular Expressi
ii libssl0.9.7 0.9.7d-4 SSL shared libraries
ii mime-support 3.28-1 MIME files 'mime.types' & 'mailcap
ii php4-cli 4:4.3.8-12 command-line interpreter for the p
ii php4-common 4:4.3.8-12 Common files for packages built fr
ii zlib1g 1:1.2.1.1-7 compression library - runtime

-- debconf information:
  php4/update_cgi_php_ini: true