Re: PHP 4.0 Bug #5328: Unable to run php 4.0.1 or 4.0.1pl2 as CGI-BIN

From: Date: Sat, 01 Jul 2000 16:59:09 +0000
Subject: Re: PHP 4.0 Bug #5328: Unable to run php 4.0.1 or 4.0.1pl2 as CGI-BIN
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-23156@lists.php.net to get a copy of this message
Hi Zeev Thank you for your prompt reply. Following your suggestion I compiled without --enable-discard-path and it worked! So I have attached the output from phpinfo() for your review. My web server is Apache 1.3.9 + PHP 3.0.12 + modSSL 2.4.9. The --enable-discard-path switch worked with PHP 4.0.0 but not with 4.0.1 and above. So is it something new to 4.0.1 that would have changed this behaviour? Thanks, Ying On Sat, 1 Jul 2000, Zeev Suraski wrote: > What Web server are you using? It appears as if PHP's discard_path > feature is not compatible with. Try configuring PHP without it, and the > problem should go away. > > If it does, please send us an .html attachment of a phpinfo() call on one > of your scripts, so we can try to figure out how to make the discard_path > feature work properly with your Web server. > > Zeev > > On 2 Jul 2000 ying@zippydesign.com wrote: > > > From: ying@zippydesign.com > > Operating system: Redhat Linux 6.0 > > PHP version: 4.0.1pl2 > > PHP Bug Type: Scripting Engine problem > > Bug description: Unable to run php 4.0.1 or 4.0.1pl2 as CGI-BIN > > > > I compiled PHP 4.0.1 and PHP 4.0.1pl2 as a CGI bin, but every time I access a .php page I > > see: > > > > Parse error: parse error in /home/httpd/cgi-bin/php on line 314 > > > > Even a simple <? echo "Hi" ?> script will cause this error, > > whereas with PHP 4.0.0 compiled with the same settings and using the same php.ini file, > > things were working. > > > > The configure switches used were: > > > > ./configure \ > > --disable-debug \ > > --enable-force-cgi-redirect \ > > --enable-discard-path \ > > --enable-track-vars \ > > --enable-magic-quotes \ > > --with-config-file-path=/etc/httpd/conf \ > > --enable-bcmath \ > > --with-imap \ > > --with-mysql \ > > --with-pdflib=/usr/local \ > > --with-gdbm > > > > I used the php.ini-optimized file and made some changes, output from diff -b > > php.ini-optimized /etc/httpd/conf/php.ini shown below: > > > > 96,103d95 > > < > > < disable_functions = > > ; This direc > > tive allows you to disable certain > > < > > ; > > functions for security reasons. It receives > > < > > ; > > a comma separated list of function names. > > < > > ; > > This directive is *NOT* affected by whether > > < > > ; > > Safe Mode is turned on or off. > > < > > < > > 124c116 > > < max_execution_time = 30 ; Maximum execution time of each script, in seconds > > --- > > > max_execution_time = 30 ; Maximum execution time of each script, in seconds (UNIX > > > only) > > 150c142 > > < error_reporting = E_ALL & ~E_NOTICE ; Show all errors > > except for notices > > --- > > > error_reporting = E_ALL ; Show all errors except for notices > > 164c156 > > < variables_order = "GPCS" ; This directive describes > > the order in which PHP re > > gisters > > --- > > > variables_order = "EGPCS" ; This directive describes > > > the order in which PHP re > > gisters > > 169c161 > > < register_globals = Off ; Whether or not to register the EGPCS > > variables as > > global > > --- > > > register_globals = On ; Whether or not to register the EGPCS > > > variables as > > global > > 175c167 > > < register_argc_argv = Off ; This directive tells PHP whether to > > declare the ar > > gv&argc > > --- > > > register_argv_argc = Off ; This directive tells PHP whether to > > > declare the ar > > gv&argc > > 184c176 > > < magic_quotes_gpc = Off ; magic quotes for incoming > > GET/POST/Cookie data > > --- > > > magic_quotes_gpc = On ; magic quotes for incoming > > > GET/POST/Cookie data > > 189,190c181,182 > > < auto_prepend_file = > > < auto_append_file = > > --- > > > auto_prepend_file = /home/httpd/apache/auto_prepend.inc > > > auto_append_file = /home/httpd/apache/auto_append.inc > > 208,211d199 > > < enable_dl = On ; Whether or not to enable the > > dl() function > > . > > < ; The dl() > > function does NOT > > properly work in multithreaded > > < ; servers, such > > as IIS or Ze > > us, and is automatically disabled > > < ; on them. > > 295,296d282 > > < mysql.default_socket = ; default socket name for local MySQL connects. > > If empty, u > > ses the built-in > > < > > > > Again, with the same ./configure switches and the same php.ini file, everything works with > > PHP 4.0.0, but not with 4.0.1 or 4.0.1pl2. > > > > > > > > > > -- > Zeev Suraski <zeev@zend.com> > http://www.zend.com/ >

« previous php.dev (#23156) next »