Bug #14416 Updated: -q and -d command line options seem to negate each other
| From: | andy at petdance dot com | Date: | Tue, 11 Dec 2001 18:28:32 +0000 |
| Subject: | Bug #14416 Updated: -q and -d command line options seem to negate each other | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-73060@lists.php.net to get a copy of this message | ||
ID: 14416
User updated by: andy@petdance.com
Reported By: andy@petdance.com
Old Status: Feedback
Status: Open
Bug Type: PHP options/info functions
Operating System: Solaris 7
PHP Version: 4.1.0
New Comment:
Yes, it still fails under the brand new 4.1.0
alester@flr4[~]$ cat dq
#!/usr/local/bin/php -dinclude_path=.:../../Class:../../Include -q
<?php
print "PHP version=".phpversion()."\n";
print "include_path=".ini_get("include_path")."\n";
?>
alester@flr4[~]$ cat qd
#!/usr/local/bin/php -q -dinclude_path=.:../../Class:../../Include
<?php
print "PHP version=".phpversion()."\n";
print "include_path=".ini_get("include_path")."\n";
?>
Results are still the same:
# ignores the -q
alester@flr4[~]$ ./dq
Content-type: text/html
PHP version=4.1.0
include_path=.:../../Class:../../Include
# ignores the -d
alester@flr4[~]$ ./qd
PHP version=4.1.0
include_path=.
Previous Comments:
------------------------------------------------------------------------
[2001-12-11 04:24:36] cardinal@php.net
Does this happen with the released PHP 4.1.0?
I don't have the RC handy, but I can't reproduce (On linux)
with 4.0.6 or 4.1.0
$ php410 -q -dinclude_path=.:../../Class:../../Include
<? echo ini_get('include_path') . "\n" ?>
.:../../Class:../../Include
$ php410 -dinclude_path=.:../../Class:../../Include -q
<? echo ini_get('include_path') . "\n" ?>
.:../../Class:../../Include
------------------------------------------------------------------------
[2001-12-10 18:00:58] andy@petdance.com
It seems that -q and -d cannot exist on the same shebang line. We're using PHP for standalone
shell scripts (i.e. no thru the web server). -q and -d seem to negate each other: Whichever comes
first on the shebang line wins.
alester@flr4[~]$ cat qd
#!/usr/src/php-4.1.0RC4/php -q -dinclude_path=.:../../Class:../../Include
<?php
print "include_path=";
print ini_get("include_path");
print "\n";
?>
alester@flr4[~]$ ./qd
include_path=.
# The -q works, since we have no headers, but the include_path isn't changed.
alester@flr4[~]$ cat dq
#!/usr/src/php-4.1.0RC4/php -dinclude_path=.:../../Class:../../Include -q
<?php
print "include_path=";
print ini_get("include_path");
print "\n";
?>
alester@flr4[~]$ ./dq
Content-type: text/html
include_path=.:../../Class:../../Include
alester@flr4[~]$
# The include path is changed, but now we have the Content-type header that -q should suppress.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14416&edit=1