[TYPO3-core] RFC: Bug / Feature #5838: Get cli_dispatch.phpsh to work on windows platforms

Christian Trabold typo3 at christian-trabold.de
Fri Oct 26 13:11:40 CEST 2007


Hi Andreas,

> Christian Trabold wrote:
>> Solution:
>> Do not set $temp_CURRENT_DIR on Windows. See attached patch.
> 
> The PHP constant will be defined in typo3/init.php on line 70 again which
> will throw a notice like:
> 
> Notice: Constant TYPO3_OS already defined in test.php on line 7 
> Call Stack: 
> 0.0009 53432 1. {main}() test.php:0
> 0.0010 53684 2. define() test.php:7
> 
> So, defining the constant TYPO3_OS in that early stage might not be the best
> idea.
...
> Maybe a new PHP constant TYPO3_cliOS could be introduced for this stage.

introducing a "new" constant with the exact property as "TYPO3_OS" has 
sounds / feels a bit odd. What do you think about this solution:


if (stristr(PHP_OS,'win')&&!stristr(PHP_OS,'darwin'))) {
	$temp_CURRENT_DIR = $_SERVER['PWD'].'/';
}


Simple and straightforward... Well, the if-statement looks a bit more 
comlicated now, but I think that's all ok.



Greetings

Christian


More information about the TYPO3-team-core mailing list