Project

General

Profile

Actions

Bug #23002

closed

PATH_thisScript definition cleanup

Added by Simon Strandgaard over 14 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-06-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

One of the first pieces of code in typo3_src/index.php is used (inconsistently) several other places in the typo3 codebase.

define('PATH_thisScript',str_replace('//','/', str_replace('\\','/', (PHP_SAPI=='cgi'||PHP_SAPI=='isapi' ||PHP_SAPI=='cgi-fcgi')&&($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED'])? ($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED']):($_SERVER['ORIG_SCRIPT_FILENAME']?$_SERVER['ORIG_SCRIPT_FILENAME']:$_SERVER['SCRIPT_FILENAME']))));

I think I had to use isset() in some ajax code for it to work, like this.

define('PATH_thisScript',str_replace('//','/', str_replace('\\','/', (PHP_SAPI=='cgi'||PHP_SAPI=='isapi' ||PHP_SAPI=='cgi-fcgi')&&(isset($_SERVER['ORIG_PATH_TRANSLATED'])?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED'])? (isset($_SERVER['ORIG_PATH_TRANSLATED'])?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED']):(isset($_SERVER['ORIG_SCRIPT_FILENAME'])?$_SERVER['ORIG_SCRIPT_FILENAME']:$_SERVER['SCRIPT_FILENAME']))));

It solved a nasty php error that I had
PHP Notice: Undefined index: ORIG_SCRIPT_FILENAME in /some/long/path/file.php on line 1234,
referer: http://example.com/index.php?id=4321

(issue imported from #M14873)

Actions #1

Updated by Alexander Opitz about 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (4.5 or 6.1)?

IMHO this was cleaned up with the bootstrap code since TYPO3 6.0, so this can be closed?

Actions #2

Updated by Alexander Opitz almost 11 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this ticket.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF