PHP 4.0 Bug #5163: cgi mode and discard_path doesn't work with Apache (Unix)
| From: | olivier dot cahagne at epita dot fr | Date: | Tue, 20 Jun 2000 22:12:15 +0000 |
| Subject: | PHP 4.0 Bug #5163: cgi mode and discard_path doesn't work with Apache (Unix) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-21884@lists.php.net to get a copy of this message | ||
From: olivier.cahagne@epita.fr
Operating system: NetBSD (and Linux)
PHP version: 4.0 Latest CVS (20/06/2000)
PHP Bug Type: Scripting Engine problem
Bug description: cgi mode and discard_path doesn't work with Apache (Unix)
Hi,
As told by Andi in bug #4456, I report a bug in the latest CVS version dealing with cgi mode and
DISCARD_PATH
I tried modifying sapi/cgi/cgi_mode.c without success unfortunately, I'll try again later.
The bug only appears in cgi mode when enabling discard_path with Apache (Unix) 1.3.12. I'm
using suEXEC with Apache.
Here's my configure line:
./configure --with-config-file-path=/usr/www/etc/httpd/conf/php_cgi \
--enable-discard-path \
--with-gd=/usr/www/mbin/i386-NetBSD \
--with-mysql \
--with-dbase \
--with-zlib=/usr/www/mbin/i386-NetBSD \
--enable-ftp \
--enable-inline-optimization \
--with-imap=/usr/www/mbin/i386-NetBSD/lib
Once I install the php binary and I run this basic script:
#!/usr/bin/php/php4
<?phpinfo()?>
I get an internal server error (Premature end of scripts), it has always worked with PHP3 with the
same setup.
This script also runs fine from a shell.
PHP4 compiled as a module works fine. It really seems to be because of DISCARD_PATH.
I've been testing PHP4 since beta1 to the latest CVS to get it to work, but I never got discard
path to work in cgi mode.
I also tested and saw the same bug on a Linux box (RedHat 6.2 with default Apache 1.3.12 [no
suEXEC]).
I run PHP with a default php.ini (I tried to set user_root and doc_root but I didn't have any
impact, as confirmed by cgi_main.c:
/* doc_root configuration variable is currently ignored,
PS: Sorry if this a duplicate with bug #4456 I reported some weeks ago but it got closed by Andi
saying it would be useful to open a new bug report if it still didn't work.