From:             [EMAIL PROTECTED]
Operating system: linux
PHP version:      4CVS-2002-12-25 (stable)
PHP Bug Type:     Unknown/Other Function
Bug description:  cgi shows header output with -q

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 bug report at http://bugs.php.net/?id=21177&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21177&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21177&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21177&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21177&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21177&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21177&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21177&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21177&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21177&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21177&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21177&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21177&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21177&r=isapi

Reply via email to