Bug #20392
closedcli_dispatch.phpsh: server variable $_SERVER['PWD'] on windows systems not available
100%
Description
In the CLI Interface (cli_dispatch.phpsh) is the server variable $_SERVER['PWD'] on windows systems not available. PHP throw a notice, because the script don't fetch the unset variable. Then the script throw a lot of warings "Can not modify header information...". The problem is also in the TYPO3 version 4.2.6.
example for a better solution (line 68 in cli_dispatch.phpsh)
// on windows don't exist $_SERVER['PWD']. This throw a php notice
// check the key existence with array_key_exists.
if (array_key_exists('PWD', $_SERVER)) {
$workingDirectory = $_SERVER['PWD'] ? $_SERVER['PWD'] : getcwd();
}
else {
$workingDirectory = getcwd();
}
(issue imported from #M11031)
Updated by Andreas Heissenberger over 12 years ago
- Target version deleted (
0)
Problem still exists in typo3 version 4.6.5 - here a quickfix without modifying the typo3 src - works with all versions:
Wrapper to call the scheduler script - eg.* typo3-scheduler.cmd*:
@echo off pushd C:\inetpub\wwwroot FOR /F "tokens=*" %%i in ('cd') do SET PWD=%%i php typo3\cli_dispatch.phpsh scheduler popd
Updated by Gerrit Code Review over 11 years ago
- Status changed from New to Under Review
Patch set 2 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/19771
Updated by Nicole Cordes over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset bce8fdc6d4bce00e098b773d36fa78746ed651fb.
Updated by Gerrit Code Review over 11 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/19772
Updated by Nicole Cordes over 11 years ago
- Status changed from Under Review to Resolved
Applied in changeset aeccd948e1dbd918cf0a7930d3f253a0aa5f446d.