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

Fix PHP warning : is_readable() open_basedir restriction in effect. #73

Open
wants to merge 2 commits into
base: pThumb-dev
Choose a base branch
from

Conversation

Maef
Copy link

@Maef Maef commented Nov 27, 2022

The Modx error log is flooded with lines like the example below when using open_basedir settings in php.ini. (open_basedir is used as a security measure)

PHP warning: is_readable(): open_basedir restriction in effect. File(/static/img/abc.webp) is not within the allowed path(s): (/var/sitename/htdocs:/tmp)

Testing if open_basedir has a string prevents is_readable() being called with a path outside these limits. Thus avoiding these loglines.

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

Successfully merging this pull request may close these issues.

1 participant