Project

General

Profile

Actions

Bug #79218

closed

ResourceCompressor.php PHP Warning: is_file(): open_basedir restriction in effect

Added by Wittkiel Gruppe over 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2017-01-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

When open_basedir is used, every backend request causes multiple errors in sys_log like this:

Core: Error handler (BE): PHP Warning: is_file(): open_basedir restriction in effect. File(/var/www/example.com/web/../typo3temp/assets/compressed/xtheme-t3skin-70db1845fe267782b0d773e08dad338b.css) is not within the allowed path(s): (/var/www/clients/client1/web1/web:/var/www/clients/client1/web1/private:/var/www/clients/client1/web1/tmp:/var/www/example.com/web:/srv/www/example.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin) in /var/www/clients/client1/web1/web/typo3_src-8.7.0/typo3/sysext/core/Classes/Resource/ResourceCompressor.php line 440

Bug introduced with patch for #78803. Easy fix would be to suppress warning with "@" in line 440 in ResourceCompressor.php:

// if the file is an absolute reference within the docRoot
$absolutePath = $docRoot . '/' . $fileNameWithoutSlash;
if (@is_file($absolutePath)) {
    ...
}

Operating system: Unix
TYPO3: 8.7.0
PHP: 7.0.15


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #78803: ResourceCompressor can't deal with paths relative to docrootClosedMarkus Klein2016-11-25

Actions
Has duplicate TYPO3 Core - Bug #81024: getFilenameFromMainDir() triggers PHP Warnings open_basedirClosedChristian Toffolo2016-11-282016-11-28

Actions
Actions #1

Updated by Wittkiel Gruppe over 7 years ago

  • Category set to Backend API
Actions #2

Updated by Wittkiel Gruppe about 7 years ago

  • Target version changed from 8.6 to 8 LTS
Actions #3

Updated by Wittkiel Gruppe about 7 years ago

  • Description updated (diff)
Actions #4

Updated by Markus Klein almost 7 years ago

  • Status changed from New to Closed
  • Target version deleted (8 LTS)

Thanks for the report. Will be fixed with #81024

Actions #5

Updated by Markus Klein almost 7 years ago

  • Has duplicate Bug #81024: getFilenameFromMainDir() triggers PHP Warnings open_basedir added
Actions

Also available in: Atom PDF