Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #37352 : cli do not parse any arguments the first line
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 20th June 02:54
External User
 
Posts: 1
Default #37352 : cli do not parse any arguments the first line


ID: 37352
Updated by: tony2001@php.net
Reported By: eddi at ai000 dot de
-Status: Open
+Status: Feedback
Bug Type: CGI related
Operating System: *
PHP Version: *
New Comment:

Both links do not work anymore.


Previous Comments:
------------------------------------------------------------------------

[2006-05-08 22:37:27] eddi at ai000 dot de

I have a patch for you:

diff: http://www.ai000.de/PHP/37352.txt
new php_cli.c: http://www.ai000.de/PHP/php_cli.c.txt

I do it as good as I can. Sorry C is not my favorite language

------------------------------------------------------------------------

[2006-05-08 00:13:35] eddi at ai000 dot de

May be it is difficult to understand me without well formed english.
But Firstly nobody scould you "it is a bug". Edink, you are scound one
telling me that. Please read this lines and do not forget, here is a
human being too, who said "is a feature request".

Secondly it is an undiscussed fact, perl or python use the arguments
from the first line reading itself.

Thirdly perl and python do so on linux and other systems like Mac OS
too. So what is the problem? All I solicit you is to dealing with
arguments from the first line.

php[-cli].ini in PWD. May be the last make the daemon unsecure. If I
could define a config file fixed in the daemon script, security is in
my hand exclusivly.

Seventhly there are no way defining discriminative config files for all
problems, that I would like to handle with PHP when I try to start
processes by script file directly. Or I have to change the directory
each time and need a script starting all written daemons too. Exactly
that (and changing my OS) suggest your answers (partially indirect).

Eighthly it is an undiscussed fact, at start up PHP reads the first
line yet. But the function cli_seek_file_begin() (from php_cli.c)
handle the first line peculiarly. Example: "#!php\rthis text is in the
first line but still displayed\n<?php /* ... */ ?>"

You may right at the point. Yes it is a handicap of the operating
system. Nonetheless we still need it. Please modifie
cli_seek_file_begin() it will parse arguments.

------------------------------------------------------------------------

[2006-05-07 21:08:40] edink@php.net

Parsing of the shebang line is a kernel task. Linux supports one
argument, FreeBSD parses them the way you would like. This is not a bug
in PHP.

------------------------------------------------------------------------

[2006-05-07 19:17:59] eddi at ai000 dot de

Please have look in the php_cli.c. The function cli_seek_file_begin
reads already the first line. Why it seems to you PHP could not support
arguments form the first line like Perl?

------------------------------------------------------------------------

[2006-05-07 19:07:36] helly@php.net

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the do***entation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

RTFM of your shell system....only one argument is supported in hash
bang lines

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/37352

--
Edit this bug report at http://bugs.php.net/?id=37352&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666