Bug #17409

cli_dispatch.phpsh not working with windows

Added by Irene Höppner over 13 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2007-06-21
Due date:
% Done:

0%

TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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)

cli_dispatch.phpsh.patch View (1010 Bytes) Administrator Admin, 2007-06-21 16:26

5838_cli_dispatch.phpsh.patch View (1.19 KB) Administrator Admin, 2007-10-19 21:38

bug_5838.diff View (4.94 KB) Administrator Admin, 2008-02-14 16:25

History

#1 Updated by Irene Höppner over 13 years ago

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

#2 Updated by Thorsten Kahler about 13 years ago

Moved to category "Backend" - anything fitting better?

#3 Updated by Christian Trabold about 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.

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...

#4 Updated by Ingo Renner over 12 years ago

removed from the roadmap until the patches passes the RFC proces

#5 Updated by Martin Kutschker over 12 years ago

Fixed in SVN for 4.2.0b3 and 4.1.6.

Also available in: Atom PDF