[TYPO3-core] RFC #12547: Bug: Default paths for Windows are not properly defined

Martin Kutschker masi-no at spam-typo3.org
Thu Nov 19 10:47:11 CET 2009


Steffen Ritter schrieb:
> Francois Suter schrieb:
>> This is an SVN patch request.
>>
>> Type: Bugfix
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=12547
>>
>> Branches:
>> Trunk (4.2?)
>>
>> Problem:
>> This bug appeared for someone while looking at the new "Installed
>> services" report. In the list of binary search paths on a Windows
>> server, paths like /usr/bin/ and /perl/bin/ are searched for (and not
>> found, obviously).
>> This is actually a Core bug, which comes from method
>> t3lib_exec::_getPaths() which had a TODO mentioning that proper
>> default paths for Windows should be defined.
>>
>> Solution:
>> The attached patch defines C:/Windows/ and C:/WINDOWS/System32/ as
>> default paths for Windows. Open questions are:
>>
>> 1) should other paths be added for this platform?
>> 2) are there issues with case-sensitivity?
>>
>> As I don't have a Windows machine I can't test in more details.
>>
>> Notes:
>> I don't know if this patch should be applied to older branches. I
>> leave that up to the respective RMs. It's definitely not critical, so
>> I wouldn't bother.
>>
>> Cheers
>>
> 
> Hi Francois,
> C:/Windows might be standard but not needed to be existant.
> 
> Could you have a try if %SystemRoot% %Path% works within PHP.
> %Path% would include SystemRoot... For possible set Envirenment
> Variables checkout cmd --> set

In $_SERVER I find these variables to be useful:

Path = C:\Programme;C:\WINDOWS\system32
SystemDrive = C:
SystemRoot C:\WINDOWS
windir => C:\WINDOWS
TEMP = C:\DOKUME~1\Masi\LOKALE~1\Temp
TMP = C:\DOKUME~1\Masi\LOKALE~1\Temp
ComSpec = C:\WINDOWS\system32\cmd.exe

For the default path I wouldn't use $Path itself but use $SytemRoot and $SystemRoot.'\system32'.

Masi


More information about the TYPO3-team-core mailing list