Reply to Re: Script running under Command Prompt or Browser or some other application?

Your name:

Reply:


Posted by Jerry Stuckle on 12/08/07 04:28

AnrDaemon wrote:
> Greetings, Jerry Stuckle.
> In reply to Your message dated Saturday, December 8, 2007, 05:36:28,
>
>>>>> In reply to Your message dated Wednesday, December 5, 2007, 14:56:22,
>>>>>
>>>>>> As he said - if it is from the command line, $argc and $argv will exist,
>>>>>> as will $_SERVER['argc'] and $_SERVER['argv'].
>>>>> Not if it is started using PHP-CGI and argc/argv vars disabled in
>>>>> configuration.
>>>> If it's using php-cgi, then it's not started from the command line, is it?
>>> You forgot that PHP-CGI *IS* a commandline executable intended to deal with
>>> pipelined I/O from/to server.
>>> And You still can use it instead of CLI (either knowing that or by accident).
>>>
>
>> No, I didn't. CGI is NOT the same as CLI. CGI is started from a web
>> server. CLI is started from a command line. The processing and options
>> are not the same - which is partly why they have different names!
>
> Go ahead and study basics, please.
>

I have studied basics. Obviously a lot more than you have.

> Your statement "they are different because they are intended to use in
> different way" is silly.
>

Nope. CGI is not the same as CLI. And if you understood that you
wouldn't make the stupid claim that they are.

> While a hammer and an axe is not the same, what makes the difference if I use
> them both to hammer the nails in the wall with exactly equal success?
>

It makes a huge difference whether you're running PHP as a CGI or a CLI.
But you don't seem to understand that. Perhaps you don't even know
what CGI is.

> Remember: rock was not intended to be weapon, but Abel was killed by the Kain
> throwed it.
>

So what? Are you starting to troll, now?

>>> JFYI:
>>> <stdout>:php-cgi.exe --help
>>> Usage: php [-q] [-h] [-s] [-v] [-i] [-f <file>]
>>> php <file> [args...]
>>>
>>> [snip]
>>>
>>>
>>> <stdout>:php.exe --help
>>> Usage: php [options] [-f] <file> [--] [args...]
>>> php [options] -r <code> [--] [args...]
>>> php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...]
>>> php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...]
>>> php [options] -- [args...]
>>> php [options] -a
>>>
>>> [snip]
>>>
>>>
>>> Not a big difference, You see. Basically no difference in general,
>>> same [-f <filename>] syntax for both versions of interpreter.
>>>
>>>
>
>> Ah, but there are differences. And much more than your little --help
>> commands show. All they have is the command line options.
>
> Show me any:
>

You seem to know everything. You figure it out. Hint: find out what
"CGI" stands for.

> silly.php:
> <?php
>
> echo "General rant with personal attack\n";
>
> ?>
>
> [C:\usr\sbin\php-5.2]$php.exe -f silly.php
> General rant with personal attack
>
> [C:\usr\sbin\php-5.2]$php-cgi.exe -f silly.php
> General rant with personal attack
>

Ah, now you're starting to troll. I made no personal attack on you.
But you've now started them.

> [C:\usr\sbin\php-5.2]$
>
> Difference between CLI and CGI versions of executable is described in the
> manual: CLI have forced to have argc/argv variables set and some other
> things. NO OTHER difference than described in the manual.
>
>

Try again. As I suggested before - figure out what CGI is. Then you
might have a clue.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация