[TYPO3-core] RFC: cli_dispatch.phpsh

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Thu Nov 30 10:59:04 CET 2006


Andreas Otto schrieb:
> 
> IMHO it is important to leave "#!/usr/bin/php" out of all scripts whoch should 
> be used via CLI. There is no guarantee that the PHP CLI is located at the set 
> position on each TYPO3 installation. Executing the file with the PHP CLI 
> calling it by its full path is enough, e. g. "php /path/to/foo/bar.php", and 
> avoids problems with different locations of the PHP CLI.

If we have #! I can still override it by using it with "php <file>".

OTOH, it might be a good idea to add an "if (PHP_SAPI!='cli') die('')" 
check. Invoking a CLI from the browser may lead to troubles, access control 
issues may be one of them.

Masi


More information about the TYPO3-team-core mailing list