[TYPO3-core] RFC: cli_dispatch.phpsh

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Nov 30 10:28:30 CET 2006


Martin Kutschker wrote: on 30.11.2006 09:34:
> Michael Stucki schrieb:
>> Martin Kutschker wrote:
>>
>>> Check $_SERVER['argv'][0] first and then do a fallback to $_ENV['_'] and
>>> $_SERVER['_'].
>>
>>
>> +1, but not tested. Would this also work if the script is still called
>> from a browser?
> 
> The "#! /usr/bin/php -q" will be shown unless you add an ob_clean().
> 
> Anyway, none of the three variables is set in my test enviroment
> (apache2handler-SAPI).

It makes no sense to call the cli dispatcher from the browser. After
all, "cli" means command line interface meaning it will interpret
command line arguments, print text-only to stdout and stderr etc... We
could provide a generic way writing "scripts" which we could call
through a CLI dispatcher and a WEB dispatcher. Then we need an api for
these maintainance scripts to access "command line arguments" (also in
web) and we need the Web dispatcher itself.

So I think we should stick to calling the cli dispatcher from the CLI
and not trying to also handle WEB requests (for which we could create a
BE module).

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list