By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,889 Members | 1,044 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,889 IT Pros & Developers. It's quick & easy.

Strange CLI behaviour

P: n/a
Dear all,

I've encountered some strange behaviour with PHP (4.3.2) using the CLI-API.
When I provide an option in the first line of my script like so:
#!/usr/bin/php -c /path_to_my_ini_file
and call the script from the (bash-)commandline, PHP seems to ignore this

Calling the script with:
php -c /path_to_my_ini_file myscript.php
works fine.

On the other hand, when the first line in my script is:
#!/usr/bin/php -m
and I call the script, the compiled in modules are listet.
Thus the options are not ignored alltogether.

#!/usr/bin/php -m -v
results in an error:
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: php [options] [-f] <file> [args...]
Do you have any idea, where this behaviour comes from?


Jul 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.