php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7641 cgi binary with "enable-discard-path" fails with empty doc_root value
Submitted: 2000-11-04 20:26 UTC Modified: 2002-01-10 02:06 UTC
From: ugb-listen at gmx dot de Assigned:
Status: Closed Package: *Web Server problem
PHP Version: 4.0 Latest CVS (04/11/2000) OS: Linux 2.2.16 i686
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ugb-listen at gmx dot de
New email:
PHP Version: OS:

 

 [2000-11-04 20:26 UTC] ugb-listen at gmx dot de
Similar Problems have been described in Bug id #5163 and Bug id #6201,
but obviously are still not resolved completely :

when compiling the cgi version,  even a simple phpinfo() doesn't work 
when called via Apache (while it works fine on the command line).

The error message in the browser shows up as:
Parse error: parse error in /usr/local/apache/cgi-bin/php on line NNN
(Apache 1.3.14 - other errors were reported by users of Netscape/iPlanet)

I have tried lots of different compilation settings, and found only one common 
element:  the problem only occurs if --enable-discard-path  is specified.

Any other combination of configure flags result in a binary that works
fine as long as --enable-discard-path is not used.

I tried both the download version 4.03pl1 and snapshot-200011041645,
the only difference with the snapshot version is that it shows a different
error message:
 Warning: Unexpected character in input: ' in
   /usr/local/apache/cgi-bin/php on line 116
   Warning: Unexpected character in input: ' in
   /usr/local/apache/cgi-bin/php on line 116
   Warning: Unexpected character in input: '' (ASCII=11) state=1 in
   /usr/local/apache/cgi-bin/php on line 116
   Warning: Unexpected character in input: '' (ASCII=8) state=1 in
   /usr/local/apache/cgi-bin/php on line 116
   Parse error: parse error in /usr/local/apache/cgi-bin/php on line 116    

A temporary solution is to set the doc_root in php.ini to a non-empty value.
However, under some circumstances it is undesirable to explicitly set this
value - e.g. when sharing a single php binary among different virtual
servers, so php shouldn't fail even without doc_root set.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-19 02:53 UTC] sniper@php.net
Does this happen with latest CVS snapshot:

http://snaps.php.net/ 


 [2001-08-20 12:28 UTC] ugb-listen at gmx dot de
Unfortunately, I am currently not able to test it due to time limitation.
Please do not close the bug report yet, I might have time to 
test ist in the next couple of weeks (this report is 8 months old anyway).

 [2001-12-20 09:48 UTC] lobbin@php.net
Any luck with the testing?

PHP 4.1.0 might be a wise choice as well.


R.
 [2002-01-10 02:06 UTC] lobbin@php.net
No feedback. Closing.
 [2004-05-14 22:18 UTC] ftrudeau at zesolution dot com
Problem still occuring with PHP 4.3.5, might as well reopen this bug case.
 [2004-06-11 06:39 UTC] paul at boxedart dot com
problem occurs with FC1 php SRPM , changed spec added --enable-fastcgi and got this error.  Can reproduce easily.  SRPM from Fedora is php-4.3.6-1.3.src.rpm
and it does include the discard path option in the spec file. I will try setting php.ini option and also recompiling without --enable-discard-path
 [2004-06-11 06:44 UTC] paul at boxedart dot com
Setting doc_root in php gives the message
"No input file specified."

I'll post back in a few with what happens with i compile without the discard option.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC