php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19632 trouble using cmdline with options
Submitted: 2002-09-27 05:21 UTC Modified: 2002-09-27 05:25 UTC
From: soletan at toxa dot de Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4CVS-2002-09-27 OS: Linux 2.4.19
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: soletan at toxa dot de
New email:
PHP Version: OS:

 

 [2002-09-27 05:21 UTC] soletan at toxa dot de
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-27 05:25 UTC] edink@php.net
This is Linux kernel limitation. You can pass only one option in #! line.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 11 02:01:30 2024 UTC