Issue Bug Closed

#14856TYPO3_SITE_URL is not set correct

old_babel 07/11/05, 11:51 updated 04/18/13, 10:25

Description

In file t3lib/class.t3lib_div.php the computation of TYPO3_SITE_URL seems to be wrong in my case. Look at the code. In my test case

PATH_thisScript = /pub/www/linum/vhost/index.php
PATH_site = /pub/www/linum/vhost/

have these values. If lPath is computed the dirname(PATH_thisScript) resolved to /pub/www/linum/vhost. So the substr command is called like

$lPath = substr(“/pub/www/linum/vhost”,strlen(“/pub/www/linum/vhost”)).’/’;

which computes to a “/” string. I think lPath should contain index.php (in my case). Now the remaining part of the calculation leads to wrong result. Reading the typo3 documentation I understand that TYPO3_SITE_URL should always point to the real typo3 Site URL. This is really difficult if the typo3 site URL is somewhere else than / of the site. A broken TYPO3_SITE_URL causes TYPO3_SITE_SCRIPT to be broken too.

SERVER: SERVER_SOFTW: Apache/1.3.26 (Unix) Debian GNU/Linux mod_gzip/1.3.19.1a mod_ssl/2.8.9 OpenSSL/0.9.6c PHP/4.3.11-0.dotdeb.0
SERVER: GATEWAY_INTE: CGI/1.1
OTHER: TYPO3_VERSION: 3.8.0
OTHER: PHP_VERSION : 4.3.11-0.dotdeb.0

(issue imported from #M1274)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.