Issue Bug Closed

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

Wittkiel Gruppe 01/09/17, 12:13 updated 05/03/17, 13:18

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

Reviews 0

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