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

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Jul 16 10:39:55 CEST 2007


Martin Kutschker wrote: on 16.07.2007 10:06:

>> This is a SVN patch request.
>>
>> Problem:
>> cli_dispatch.phpsh cannot be used under Windows.
>>
>> The problem is an if-condition, that checks if a path is absolute,
>> looking if the path starts with "/". This is always true on windows
>> systems.
>>
>> Solution:
>> Check for Windows platform at appropriate place.
>>
>> Thanks to Irene Höppner for the bug report and suggested solution!
> 
> The solution doesn't look right. It doesn't not use the TYPO3 OS
> constant (is it already set at this point?)

No, at this point we are trying to find out where "typo3" path is to
include "init.php", which will then set TYPO3_OS.

> and doesn't check for a real Windows absolute path (which shoud look
> like /^[A-Z]:\\/).

The solution in the if-construct doesn't work under Windows anyway
(there is no $_SERVER['PWD']). Maybe we could try using getcwd()? I
wonder why Kasper didn't try it with that function in the first place.
Maybe there are some caveats about it (e.g. regarding symlinked
installations). But because of those obscure things, I wouldn't dare
change that code at this point.

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list