Bug #21791
closedOutput of t3lib_div::getIndpEnv for TYPO3_SITE_SCRIPT for Rewritten URLs
0%
Description
I tried to install cooluri and mentioned that it is not working correctly. The SQL-Selects to the cached URLs were wrong.
But I found out, that the problem is caused in class.t3lib_div.php. Cooluri asks for t3lib_div::getIndpEnv('TYPO3_SITE_SCRIPT') and get's a wrong result, or I have a wrong configuration. But it is a fresh installed Debian-Squeezy with typo3 4.2.10.
This is the output of t3lib_div::getIndpEnv('_ARRAY') for the same server configuration:
[HTTP_HOST] => test.test.tst
[TYPO3_HOST_ONLY] => test.test.tst
[TYPO3_PORT] =>
[PATH_INFO] =>
[QUERY_STRING] =>
[REQUEST_URI] => /metalltechnik/
[HTTP_REFERER] => http://test.test.tst/typo3/index.php?id=41
[TYPO3_REQUEST_HOST] => http://test.test.tst
[TYPO3_REQUEST_URL] => http://test.test.tst/metalltechnik/
[TYPO3_REQUEST_SCRIPT] => http://test.test.tst/typo3/index.php
[TYPO3_REQUEST_DIR] => http://test.test.tst/typo3/
[TYPO3_SITE_URL] => http://test.test.tst/typo3/
[TYPO3_SITE_SCRIPT] => technik/
[TYPO3_SSL] =>
[TYPO3_REV_PROXY] =>
[SCRIPT_NAME] => /typo3/index.php
[TYPO3_DOCUMENT_ROOT] => /var/lib/typo3-dummy
[SCRIPT_FILENAME] => /var/lib/typo3-dummy/index.php
[REMOTE_ADDR] => 77.75.204.55
[REMOTE_HOST] =>
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 GTB6
[HTTP_ACCEPT_LANGUAGE] => en-us,de-de;q=0.8,de;q=0.5,en;q=0.3
The Script around Line 3600 (have now some debugging code
case 'TYPO3_SITE_SCRIPT':
$retVal = substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'),strlen(t3lib_div::getIndpEnv('TYPO3_SITE_URL')));
This would be
substr( "http://test.test.tst/metalltechnik/", strlen(http://test.test.tst/typo3/))
which results to
"technik/"
For Cooluri the result needed would be
"metalltechnik/"
Anyway "technik/" is total non-sense.
So, maybe this is a question of wrong server configuration. On the other hand I have a fresh installation with only few configuration.
(issue imported from #M12913)