Project

General

Profile

Actions

Bug #98330

closed

PHP warning log with EXT-syntax using asset vh in BE

Added by Roman Büchler about 2 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Miscellaneous
Start date:
2022-09-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Description
When using an asset view helper in the backend context referencing a resource from a 3rd party extension a php warning entry is added to the sys_log table. The behavior can be observed when the php configuration `open_basedir` is set and "Live" is selected as debug settings in the configuration presets from the settings module. The warning log entry looks as following:

Core: Error handler (BE): PHP Warning: file_exists(): open_basedir restriction in effect. File(/typo3conf/ext/pizpalue/Sysext/backend/Resources/Public/Css/LayoutModule/collapsible-content-element.css) is not within the allowed path(s): (/home/httpd/vhosts/domain.ch/:/tmp/) in /home/httpd/vhosts/domain.ch/httpdocs/pizpalue/public/typo3/sysext/core/Classes/Utility/GeneralUtility.php line 2317 

Example use case
An extension with the extension key myext overwrites the partial `PageLayout/Record.html` from the system extension "backend" and uses an asset view helper in the overriding partial as following:

<f:asset.css identifier="myext-backend" href="EXT:myext/Path/To/Css/custom.css" />

Findings
- The log entry can be avoided by adjusting the global configuration `[SYS][belogErrorReporting]`
- When checking for file existence in `GeneralUtility` the `open_basedir` could be checked using `ini_get('open_basedir')` prior using `file_exists()`


Related issues 3 (1 open2 closed)

Related to TYPO3 Core - Bug #98545: file_exists(): open_basedir restriction in effectClosed2022-10-07

Actions
Related to TYPO3 Core - Bug #98152: PHP Warning: file_exists(): open_basedir restriction in effect. ClosedBenni Mack2022-08-16

Actions
Related to TYPO3 Core - Bug #101350: open_basedir restriction in effectAccepted2023-07-14

Actions
Actions

Also available in: Atom PDF