I've been looking at the source code for Perl and comparing how it reads arguments versus PHP's method, and it seems to be expected behaviour, as Perl handles the arguments as edink has shown below.
As to why this behaviour is such, I'm at a loss. You'd think that the behaviour would try to match starting up a process from a shell, i.e. having a whole array of arguments in argv rather than having everything mashed into argv[1]. Maybe it's a POSIX thing or something? J [EMAIL PROTECTED] wrote: > ID: 14930 > Updated by: elixer > Reported By: [EMAIL PROTECTED] > Status: Analyzed > Bug Type: Output Control > Operating System: linux 2.4.9 > PHP Version: 4.1.1 > New Comment: > > I don't think this is a glibc issue. Its (AFAIK) the kernel's > responsibility to set this stuff up. Take a look at load_script() in > fs/binfmt_script.c of the linux source. It seems that only one argument > is allowed, and everything after the interpreter (/usr/local/bin/php) up > until the EOL is considered one argument. I'm sure there is a reason > for implementing it this way, I just don't know what it is. > > Sean > > > Previous Comments: > ------------------------------------------------------------------------ > > [2002-01-08 19:29:05] [EMAIL PROTECTED] > > I was able to reproduce this. However it does not appear > to be a php bug. Most likely a glibc bug. > > If I put this line on top of my script: > #!/usr/bin/php -q -c /path/to/ini/file -C > > the following values get passed to > php's main() function. > > argc=3 > argv[0]: php > argv[1]: -q -c /path/to/ini/file -C > argv[2]: ./test (which is the name of the script) > > With parameters passed like that, php has > no chance of passing them correctly. > > FreeBSD systems appear to be free of this problem. > > ------------------------------------------------------------------------ -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]