ID:          30056
 Updated by:  [EMAIL PROTECTED]
 Reported By: techtonik at tut dot by
 Status:      Wont fix
 Bug Type:    Feature/Change Request
 PHP Version: Irrelevant
 New Comment:

"At least you can make it phpi.exe or phpex.exe."

That's not differnt from having two versions. (dot)



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

[2004-09-11 00:04:30] techtonik at tut dot by

Sure it will introduce some problems, but only with PHP and support
scripts installation and only with one of the CGI and CLI stepbrothers.


This is major change and it, of course, should be indicated at the top
of install.txt. 

Those, who are running CGI version won't feel any changes in PHP's
behavior. Only CLI users will need to change their PHP detection
routines by adding "-f" or "--cli" key to execute the scipt.  

There also can be some environment checks to detect CGI or CLI mode of
PHP executable along with explicit keys. At least you can make it
phpi.exe or phpex.exe.

If they are so different, you can glue the binaries and include stub,
which will parse cmdline or cgi environment variables and pass control
to appropriate part. This is a bad solution, since CLI version is very
limited under windows (it doesn't understand ordinary quotes, for
example), but it will be possible to release such thing at least in
next year.

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

[2004-09-10 23:21:08] [EMAIL PROTECTED]

You are at least one year to late. Now such a change would introduce a
major BC problem for both versions. Also it is not so easily to merge
them because they are in fact very different. Just read the docs and be
done. If some users don't read it and get a problem, well than it is
their problem.

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

[2004-09-10 21:26:07] techtonik at tut dot by

Description:
------------
I know that it is strange request and for developers it is more
difficult to support two different functionalities in one binary,
but..

For a long run PHP had this two .exe messing around and often it was
quite easy to mention CLI instead of CGI and vice versa. With PHP5 CLI
version becomes default and CGI migrated into directory. In PHP4 in
directory was CLI version. Although it is quite easy to remember, it is
rather hard to explain users what is CGI or CLI, why their php.exe is
incorrect and where to find another php.exe. Often they just replace
CGI with CLI (with "correct" version, ehh)  and after upgrade to the
story begins anew.

I know that this is not so easy, but if there were a voting systems for
proposals I bet this one would be in the first 20. I propose to leave
default behavior as CGI and use "-f" key to execute script in CLI mode.
Of course, it is more convenient to leave default mode to CLI, but it
can probably  lead to incompatibilities with CGI specification.

Reproduce code:
---------------
CGI behavior
php.exe file.php

CLI
php.exe -f file.php




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


-- 
Edit this bug report at http://bugs.php.net/?id=30056&edit=1

Reply via email to