[TYPO3-core] RFC: Bug #5838: cli_dispatch.phpsh not working with windows

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Mon Jul 16 22:55:40 CEST 2007

Andreas Otto schrieb:
> Hi Michael,
> Michael Stucki wrote:
>> All I can say is that is doesn't break my existing system. But if Irene,
>> you and Masi have tested this, it's ok to go ahead.
> The following code is used in the extension dkd_staticupload_scp:
>         // Defining PATH_thisScript here: Must be the ABSOLUTE path of this script
> in the right context:
>         // This will work as long as the script is called by it's absolute path!
> // define('PATH_thisScript',$_ENV['_']?$_ENV['_']:$_SERVER['_']);
> define('PATH_thisScript',$_SERVER['argv'][0]);

Using absolute path worked. The bug is about a problem when the Unix 
code for relative paths broke always on Windows.

The current code is BTW this:

$temp_PATH_thisScript =
   isset($_SERVER['argv'][0]) ? $_SERVER['argv'][0] :
         (isset($_ENV['_']) ? $_ENV['_'] : $_SERVER['_']);


More information about the TYPO3-team-core mailing list