Project

General

Profile

Actions

Bug #17535

closed

index.php assumes current working directory to be PATH_site

Added by Peter Dinges over 16 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Communication
Target version:
-
Start date:
2007-08-16
Due date:
% Done:

0%

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

Description

After a recent PHP upgrade from 5.1.2-r3 to 5.2.4_pre200708051230-r2 on Gentoo Linux, the Typo3 frontend suddenly stopped working. After some investigation it turned out that the current working directory used in index.php is no longer the link source directory "PATH_site/", but the link target "/path/to/typo3_src/". Therefore, the relative paths used to include libraries via TS, like in my case templavoila, were no longer found.

Attached patch changes the current working directory to PATH_site at the very beginning of index.php. Thus, the assumptions about the CWD are fulfilled again.

It might be that this is a Gentoo specific PHP issue. After all, they seem to use a pre-release. However, clarifying the made assumptions about the CWD does not harm either.

Maybe someone with a test server can check PHP's beavhiour regarding the CWD of linked files in different versions. Consider the following test setup:
$ mkdir $HTDOCS/bar/
$ echo '' > $HTDOCS/bar/foo.php
$ ln -s $HTDOCS/bar/foo.php $HTDOCS/foo.php

It seems that the expected and old output of http://host/foo.php is "$HTDOCS". In my setup however, the output is "$HTDOCS/bar".

Setup: Apache 2.2.4-r11 with mod_fcgid and PHP 5.2.4_pre200708051230-r2 (FastCGI) on Gentoo Linux.
(issue imported from #M6158)


Files

typo3_src-4.1.2-site_path_cwd.patch (948 Bytes) typo3_src-4.1.2-site_path_cwd.patch Administrator Admin, 2007-08-16 08:02
0006158.patch (1.19 KB) 0006158.patch Administrator Admin, 2008-02-04 14:45
0006158_v2.patch (1.27 KB) 0006158_v2.patch Administrator Admin, 2008-02-04 23:42

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #14692: Access to file resources does not work with mod_fcgidClosed2005-04-20

Actions
Actions

Also available in: Atom PDF