#100021Incorrect path because of absolutely reference file(s) in typo3/cms-dashboard plus it causes open_basedir warnings
Description
When I upgraded to TYPO3 10.4.36 I started getting open_basedir warnings. I think the problem is that the file is being absolutely referenced (e.g. /typo3/sysext/…) instead of relatively referenced (e.g. typo3/sysext/…) or absolutely with the actual project root path prepended to it (e.g. /var/www/typo3/sysext/…).
Warning when I click on Dashboard in the backend sidebar menu…
Core: Error handler (BE): PHP Warning: file_exists(): open_basedir restriction in effect. File(/typo3/sysext/dashboard/Resources/Public/Css/dashboard.css) is not within the allowed path(s): ...
Warning when I click on View in the backend sidebar menu…
Core: Error handler (BE): PHP Warning: file_exists(): open_basedir restriction in effect. File(/typo3/sysext/viewpage/Resources/Public/Css/ui-lightness/jquery-ui-1.10.3.custom.min.css) is not within the allowed path(s): ...
Another person report this warning but don’t know what they clicked on to get there…
Core: Error handler (BE): PHP Warning: file_exists(): open_basedir restriction in effect. File(/typo3/sysext/dashboard/Resources/Public/Css/Contrib/chart.css) is not within the allowed path(s): ...
You can see there are several of us that have had this issue, see https://typo3.slack.com/archives/C025BQLFA/p1676556205848739.
Reviews 2
Related issues 4
- Bug #101350open_basedir restriction in effect
- Bug #101778Configuration Presets open_basedir
- Bug #101921open_basedir restriction in effect. File(/typo3/sysext/form/Resources/Public/Css/form.css) is not within the allowed
- Bug #102736Install Tool Configuration Presets broken for image handling settings with debug mode enabled
History 10
-
Garvin Hicking changed Related to #101921 <span data-processor="relativetime" data-value="2023-09-19T07:29:56+00:00" > 09/19/23, 07:29 </span>
-
Michael Kasten commented <span data-processor="relativetime" data-value="2024-01-29T15:46:35+00:00" > 01/29/24, 15:46 </span>
I can confirm this for TYPO3 v 11.5.33 (using PHP 8.0) and also for third party extensions.
It is clear that these warnings are just logged, but dont underestimate this Problem:
1) you will see real Problems in the sys_log table
2) If you don’t care about your sys_log table sometimes the table can grow realy fast -
Dan Kleine (Untenzu) commented and changed Complexity
no-brainermedium <span data-processor="relativetime" data-value="2024-06-17T16:08:27+00:00" > 06/17/24, 16:08 </span>Confirmed in TYPO3 11.
> These warnings are only logged, the files mentioned are all loaded successfully.
The reason for this is within /typo3/cms-core/Classes/Utility/GeneralUtility.php:2317
try { $fileExists = file_exists($path); } catch (\Throwable $e) { $fileExists = false; }It fails, and therefore throws an error, for resources that look absolute but are relative to the web root. It then continues to resolve the path otherwise. Thats why it is indeed still working.
This error is logged every time an editor uses a part of the dashboard. This doesn’t hapen too often, but still fills the syslog for no good reason.
The cause of the issue, passing the wrong path to GeneralUtility, has to be resolved within EXT:cms-dashboard.
Example: /typo3/cms-dashboard/Classes/DashboardInitializationService.php:217
if (PathUtility::isExtensionPath($cssFile)) { $cssFile = PathUtility::getPublicResourceWebPath($cssFile); }Issue #101921 shows that the same beaviour was found and resolved in ext:cms-forms, maybe it is possible to port the change to this extension as well.
-
Garvin Hicking changed Related to #101350 <span data-processor="relativetime" data-value="2024-07-31T14:38:48+00:00" > 07/31/24, 14:38 </span>
-
Garvin Hicking changed Related to #101778 <span data-processor="relativetime" data-value="2024-07-31T14:39:05+00:00" > 07/31/24, 14:39 </span>
-
Garvin Hicking changed category Tags open_basedir <span data-processor="relativetime" data-value="2024-07-31T14:39:31+00:00" > 07/31/24, 14:39 </span>
-
Garvin Hicking changed Related to #102736 <span data-processor="relativetime" data-value="2024-08-03T21:49:20+00:00" > 08/03/24, 21:49 </span>
-
Benni Mack commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2025-04-09T17:06:04+00:00" > 04/09/25, 17:06 </span>Hey everyone,
can you confirm that this change solves this problem as well? https://review.typo3.org/c/Packages/TYPO3.CMS/+/87224
-
Georg Ringer commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2026-10-16T18:24:35+00:00" > 10/16/26, 18:24 </span>Closing this issue due to lack of feedback.
The code path described here (`GeneralUtility::createVersionNumberedFilename()`) has been reworked in #105691 and replaced by the System Resource API, and no feedback was given on whether the fix resolves this issue.
If this is still valid for you in v14, please open a new issue and provide information how to reproduce it. Thanks!
I can confirm this in Typo3 v10.4.42 not for dashboard but for a 3rd party extension (I think cause and effect are the same):
But: These warnings are only logged. they have no influence on the system, as the files mentioned are all loaded successfully.