Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file_exists(): open_basedir restriction in effect since build 467 #75

Open
remko-key opened this issue Oct 5, 2020 · 2 comments
Open

Comments

@remko-key
Copy link

After upgrading to the latest OctoberCMS version running under PHP 7.4 my sites where generating these Exception errors like:

An exception has been thrown during the rendering of a template ("file_exists(): open_basedir restriction in effect. File(/storage/app/media/logos/vdz-logo.png) is not within the allowed path(s):

Looking into the code I noticed that the storage path was absolute and not reading from the storage folder. By modifying the class everything works fine again. Are there more people suffering this issue? If so can you update the code?

Line 48 in Class Image.php:
$this->filePath = (file_exists(storage_path($filePath)))

@remko-key remko-key changed the title file_exists(): open_basedir restriction in effect file_exists(): open_basedir restriction in effect since build 467 Oct 5, 2020
@geraldbaume
Copy link

+1 I'm bit short on time to do a PR. But just experienced the same issue in a production system.

@kosmonowt
Copy link

here as well. somehow many of our servers and reseller hosting packages now have that problem: data-src="{{ background | resize(size_small) }}" as an example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants