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

(Option 2 Find/Replace) Fix error log spam PHP message: PHP Warning: is_dir(): open_basedir restriction in effect. File ... is not within the allowed path(s) #21592

Closed

Conversation

agileware-justin
Copy link
Contributor

Overview

Fix error log spam PHP message: PHP Warning: is_dir(): open_basedir restriction in effect. File ... is not within the allowed path(s).

This is Option 2 of two possible approaches to solving this problem. This PR is a broader approach. Option 1 is here #21591

Before

Error message logged repeatedly when using CiviCRM backend. PHP message: PHP Warning: is_dir(): open_basedir restriction in effect. File ... is not within the allowed path(s)

After

No more error messages logged.

Technical Details

Same approach as #11086

Comments

May break other things, hopefully tests will pick that up.

Related to #21589

Agileware Ref: CIVICRM-1651

@civibot
Copy link

civibot bot commented Sep 24, 2021

(Standard links)

@civibot civibot bot added the master label Sep 24, 2021
@agileware-justin agileware-justin changed the title (Option 2) Fix error log spam PHP message: PHP Warning: is_dir(): open_basedir restriction in effect. File ... is not within the allowed path(s) (Option 2 Find/Replace) Fix error log spam PHP message: PHP Warning: is_dir(): open_basedir restriction in effect. File ... is not within the allowed path(s) Sep 24, 2021
@demeritcowboy
Copy link
Contributor

I'm generally against the use of @ because see https://lab.civicrm.org/dev/core/-/issues/2795. Another option 3 might be a wrapper function for is_dir that checks if open_basedir is being used.

@agileware-justin
Copy link
Contributor Author

Closing as fix for the broader issue is being developed on #21923

@agileware-justin
Copy link
Contributor Author

@demeritcowboy should probably re-do this PR with \CRM_Utils_File::isDir now that #22107 has been merged. Right?

@demeritcowboy
Copy link
Contributor

Yes some of them. Some of them should just stay with the regular is_dir (e.g. api4/services - extensions can't be outside open_basedir or they wouldn't work at all). I can take a look.

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

Successfully merging this pull request may close these issues.

2 participants