#19632 [NEW]: trouble using cmdline with options
| From: | soletan at toxa dot de | Date: | Fri, 27 Sep 2002 10:21:24 +0000 |
| Subject: | #19632 [NEW]: trouble using cmdline with options | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-20566@lists.php.net to get a copy of this message | ||
From: soletan@toxa.de
Operating system: Linux 2.4.19
PHP version: 4CVS-2002-09-27
PHP Bug Type: *General Issues
Bug description: trouble using cmdline with options
Hi,
I'm using PHP cmdline-version called by shell shortcut comment
#!/usr/local/bin/php ...
with options
-d log_errors=On -q
which made the -q get ignored under 4.2.3. So I tried to use latest
CVS-snapshot as defined above.
Well, this problem has gone, but then I tried to include some definitions
with option -d.
------------------------
#!/usr/local/bin/php -d display_errors=Off
<?php include "notthere.php"; ?>
------------------------
produces
------------------------
Warning: main(notthere.php) [http://www.php.net/function.main]: failed to
create stream: No such file or directory in ./test on line 1
Warning: Failed opening 'notthere.php' for inclusion
(include_path='.:/usr/lib/php') in ./test on line 1
------------------------
Can't I overload system-wide configuration file by using this option -d???
BTW: Some other failure I realised with the first test under 4.2.3 appears
in that CVS-version, too. Writing -q as first option before -d ....
produces some error output
------------------------
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
Usage: [...]
------------------------
which is then completed by the list of available options.
I tried to turn it into using -c with some optional configuration file
#!/usr/local/bin/php -q -c /etc/test.ini
and set display_errors to false in that file. With -q it still produces
the error output, so this could be a false of -q handling. Removing it
produces still the file-not-found-warnings ...
After finding several bugs I'm forced to use your beta-cvs-snapshots
within production tools and urgently need some release (called stable
officially) which fixes this and the recent bugs ... thanks.
Thomas Urban
--
Edit bug report at http://bugs.php.net/?id=19632&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19632&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19632&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19632&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19632&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19632&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19632&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19632&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19632&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19632&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19632&r=globals