Bug #17409

cli_dispatch.phpsh not working with windows

Added by Irene Höppner about 14 years ago. Updated almost 11 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


It is not possible to run a cli script using cli_dispatch.phpsh, if the server is 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 as absolute paths dont start with / there.

I added a patch (based on revision 2364), which might not be the perfect solution, but it adds a check of the OS, so the script doesn't change for linux systems but can be used on windows systems as well.
(issue imported from #M5838)


cli_dispatch.phpsh.patch (1010 Bytes) cli_dispatch.phpsh.patch Administrator Admin, 2007-06-21 16:26
5838_cli_dispatch.phpsh.patch (1.19 KB) 5838_cli_dispatch.phpsh.patch Administrator Admin, 2007-10-19 21:38
bug_5838.diff (4.94 KB) bug_5838.diff Administrator Admin, 2008-02-14 16:25

Updated by Irene Höppner about 14 years ago

Sorry, the category ist not correct... :-)


Updated by Thorsten Kahler over 13 years ago

Moved to category "Backend" - anything fitting better?


Updated by Christian Trabold over 13 years ago

I can confirm this issue and it's definitly a blocker.

Fact: It's impossible to start the crawler via command line on Windows machines without a core-patch because the path to the script ALWAYS gets prepended with "/", which results in false include paths.


C:\>php C:/Inetpub/wwwroot/project/typo3/cli_dispatch.phpsh crawler
ERROR: /C:/Inetpub/wwwroot/project/typo3/cli_dispatch.phpsh was not a file. ...

The attached patch solves this by checking agains Windows-Environment and stays 100% compatible for UNIX systems.

@Irene: I don't think that this

if ($temp_PATH_thisScript{0}!='/' && TYPO3_OS!='WIN')

is a good idea, because in this case we never get is_file to work:

if (!@is_file($temp_PATH_thisScript))    {

This file-check is IMO important and should not be dropped on Windows-Servers...


Updated by Ingo Renner over 13 years ago

removed from the roadmap until the patches passes the RFC proces


Updated by Martin Kutschker over 13 years ago

Fixed in SVN for 4.2.0b3 and 4.1.6.

Also available in: Atom PDF