ID: 21177
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Unknown/Other Function
Operating System: linux
PHP Version: 4CVS-2002-12-25 (stable)
New Comment:
Confirmed.
main/main.c seems to have added a second call to sapi_active with
r1.515 which is reinitializing the sapi globals after they've been sent
(in this case, 'headers_sent' being set to '1' by the -q option)
Checking with patch committer...
Previous Comments:
------------------------------------------------------------------------
[2002-12-25 02:08:24] [EMAIL PROTECTED]
Reproduced with HEAD
------------------------------------------------------------------------
[2002-12-25 01:29:58] [EMAIL PROTECTED]
I've been looking for PEBKAC but it doesn't seem to be the case.
Here's the commandline output (with some whitespace changes), this is
latest checkout of the PHP_4_3 branch and also exists in HEAD:
rock:/cvs/a/php4# cat a.php
<?php
print "Hello World\n";
?>
rock:/cvs/a/php4# sapi/cgi/php -v
PHP 4.3.0-dev (cgi), Copyright (c) 1997-2002 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies
rock:/cvs/a/php4# sapi/cgi/php -q a.php
Content-type: text/html
X-Powered-By: PHP/4.3.0-dev
Hello World
rock:/cvs/a/php4# sapi/cli/php a.php
Hello World
rock:/cvs/a/php4# sapi/cgi/php -h
Usage: php [-q] [-h] [-s [-v] [-i] [-f <file>]
php <file> [args...]
-a Run interactively
-C Do not chdir to the script's directory
-c <path>|<file> Look for php.ini file in this directory
-n No php.ini file will be used
-d foo[=bar] Define INI entry foo with value 'bar'
-e Generate extended information for debugger/profiler
-f <file> Parse <file>. Implies `-q'
-h This help
-i PHP information
-l Syntax check only (lint)
-m Show compiled in modules
-q Quiet-mode. Suppress HTTP Header output.
-s Display colour syntax highlighted source.
-v Version number
-w Display source with stripped comments and
whitespace.
-z <file> Load Zend extension <file>.
rock:/cvs/a/php4#
And now from a PHP 4.2.3 CGI binary:
rock:/cvs/a/php4# php4 -v
4.2.3
rock:/cvs/a/php4# php4 a.php
X-Powered-By: PHP/4.2.3
Content-type: text/html
Hello World
rock:/cvs/a/php4# php4 -q a.php
Hello World
rock:/cvs/a/php4#
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21177&edit=1