Beta4 fails with CGI and NetBSD
| From: | Olivier Cahagne | Date: | Tue, 22 Feb 2000 16:57:14 +0000 |
| Subject: | Beta4 fails with CGI and NetBSD | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-10649@lists.php.net to get a copy of this message | ||
Hello,
I have troubles when running PHP4 beta 4 on NetBSD 1.3.3 (x86) with gcc 2.7.2.2
as CGI.
Short: a simple script fails with beta4 as CGI while ok with PHP3 as CGI.
PHP4 compiled as module works fine.
I'm currently running Apache 1.3.11 and PHP4 beta 4 compiled as module and
everything runs fine. I only have problems with the CGI version (suEXEC'd or
not, it doesn't make any difference).
Here's my minimum compile line :
./configure --with-config-file-path=/etc/httpd/conf/php_cgi \
--enable-discard-path
Here's a simple script:
!#/bin/php/php4
<? echo ("this is the simplest, an SGML processing instruction\n"); ?>
So when running this script in a shell, it runs ok and here's the ouput:
X-Powered-By: PHP/4.0b4
Content-Type: text/html
this is the simplest, an SGML processing instruction
But when loading it on the Web (tried various browsers), I get an internal
server error and the error_log shows the following:
Premature end of script headers
This script runs fine with PHP3.0.14 (with mysql, zlib and gd) compiled as CGI
(which has been running fine for 6 months, and I'm trying to upgrade to PHP4
for the CGI).
PHP3 and 4 are in the same directory, the only difference is the ini file,
which is the latest one (included in the archive) for PHP4.
It only fails when running it with PHP4beta4. This script also runs fine when
executed by the PHP module (PHP4 beta 4).
Do you have any idea ?
Additional notes:
- a similar script written in another language runs fine, so I don't think it
comes from file permission.
- I'm not turning off magic_quotes.
- I couldn't compile (errors) the previous betas as CGI on this server.
- Here're the various warnings I get when compiling PHP4beta4 as a CGI:
cgi_main.c:320: warning: variable
behavior' might be clobbered by longjmp' or
`vfork'
cgi_main.c:321: warning: variable no_headers' might be clobbered by longjmp'
o
r `vfork'
cgi_main.c:322: warning: variable free_path_translated' might be clobbered by
longjmp' or `vfork'
cgi_main.c:325: warning: variable argv0' might be clobbered by longjmp' or
`vf
ork'
cgi_main.c:327: warning: variable interactive' might be clobbered by longjmp'
or `vfork'
regexec.c:19: warning: `nope' defined but not used
configuration-scanner.c:652: warning: return-type defaults to `int'
configuration-scanner.c: In function `cfglex':
configuration-scanner.c:720: warning: label `find_rule' defined but not used
configuration-scanner.c: At top level:
configuration-scanner.c:1790: warning: `yy_flex_realloc' defined but not used
configuration-scanner.c:1273: warning: `yyunput' defined but not used
file.c:607: warning: tempnam() possibly used unsafely, consider using mkstemp()
rfc1867.c:247: warning: tempnam() possibly used unsafely, consider using mkstemp
()
--
Olivier.Cahagne@epita.fr