[TYPO3-core] RFC: cli_dispatch.phpsh

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Mon Dec 11 11:09:36 CET 2006


Ernesto Baschny [cron IT] schrieb:
> This is a SVN patch request
> 
> Type: Bugfix
> 
> Description:
> 
> Kasper added the nice "cli_dispatch.phpsh" script to TYPO3 core. I was
> trying to use it to call some CLI's, but it failed with:
> 
> ERROR: /home/ernst/typo3cvs.cron.stgt.vpn/typo3/ was not a file. Maybe your
> environment does not support running this script with a relative path? Try
> to run the script with its absolute path and you should be fine.
> 
> Neither $_ENV['_'] nor $_SERVER['_'] is set on my server ("standard"
> SuSE Linux with PHP 4.3.8).
> 
> The attached patch just changes the method of finding out the current
> path to using $_SERVER['argv'][0], which should always be set when
> calling a PHP script from CLI.

New version:

* adds SAPI check
* uses $_SERVER['argv'][0] as first choice
* sets TYPO3_cliKey correctly (for the benefit of the script)
* drops unnecessary $BACK_PATH

Masi
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cli_dispatch.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20061211/d6f8835d/attachment.diff 


More information about the TYPO3-team-core mailing list