Strange CLI behaviour

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frank Passek

    Strange CLI behaviour

    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
    setting.

    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.

    Using
    #!/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?

    Cheers
    Frank

Working...