Bug #17409
closedcli_dispatch.phpsh not working with windows
0%
Description
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)
Files
Updated by Irene Höppner over 17 years ago
Sorry, the category ist not correct... :-)
Updated by Thorsten Kahler about 17 years ago
Moved to category "Backend" - anything fitting better?
Updated by Christian Trabold about 17 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.
Example:
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 almost 17 years ago
removed from the roadmap until the patches passes the RFC proces
Updated by Martin Kutschker over 16 years ago
Fixed in SVN for 4.2.0b3 and 4.1.6.