Bug #14930: CLI header suppression problems
| From: | dark_panda at hotmail dot com | Date: | Tue, 08 Jan 2002 15:54:05 +0000 |
| Subject: | Bug #14930: CLI header suppression problems | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-76264@lists.php.net to get a copy of this message | ||
From: dark_panda@hotmail.com
Operating system: linux 2.4.9
PHP version: 4.1.1
PHP Bug Type: Output Control
Bug description: CLI header suppression problems
I don't know if this should go under output control but
anyways...
The command line executable is having problems suppressing
the headers using the -q option in combination with the -c
option if you're running the script as, well, a script. For
instance, take this small script:
#!/usr/local/bin/php -c /path/to/ini/file -q
<?php
echo "hello world";
?>
The headers won't be suppressed if you try running the
script with a command like
$ ./smallscript.php
X-Powered-By: PHP/4.1.1
Content-type: text/html
hello world
However, running the script like so:
$ php -q -c /path/to/ini/file smallscript.php
hello world
produces the expected result, without the headers.
Also, this may or may not be an associated bug, but if you
put the -q option before the -c option in the command line
for a script, i.e.
#!/usr/local/bin/php -q -c /some/path
<?php
...
?>
An error is produced, which looks something like this:
Error in argument 1, char 3: option not found
Error in argument 1, char 4: option not found -
Error in argument 1, char 3: option not found
along with the output from "php -h". This doesn't happen
when you execute directly from the command line, only when
the command line is in the script file itself.
J
--
Edit bug report at: http://bugs.php.net/?id=14930&edit=1