-
Notifications
You must be signed in to change notification settings - Fork 68
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
[BUGS-6318] file_exists(): open_basedir restriction in effect. #423
Comments
Hi! Could you please provide steps to reproduce? (i.e. how is your redis setup and host configuration, what do you do to get the warning, etc) Thanks! |
Hi, Thanks for getting back to me. I am using the default Redis configuration with unix socket instead of tcp. The only change I made is in the php.ini file, where I have set an opendir_base redirection.
PHP files won't execute outside of this directory as per this restriction set. I am not facing the same issue with the Redis Cache plugin available at https://wordpress.org/plugins/redis-cache/. Best regards, |
Hi Kevin, I have implemented a temporary solution to enable PHP files to access the Redis Unix socket. However, I am not satisfied with this approach as I believe it compromises security. Could you please review @tillkruss object cache file (https://github.com/rhubarbgroup/redis-cache/blob/develop/includes/object-cache.php) and observe how he manages to access the Unix socket without requiring any bypass to the open_basedir protection? Temporary solution: |
@kporras07 The issue is solved if, instead of looking for the file, we look for the Unix socket. Current: Suggested: Then defining the following in the wp-config.php file
What do you think? |
@hj-collab thanks! That's a lot of useful info. I created an internal ticket and will be adding this info there and pass this along to the team that works on this plugin. Internal ticket: BUGS-6318 Thanks! |
Is there anything I can contribute here? |
@kporras07 Thanks Kevin! @tillkruss Can you please check if my suggested solution is the way to go? Because it won't work unless they specify unix:/// in the file path for socket. Pantheon will have to update the documentation to reflect the same.
|
@hj-collab Using WP Redis or using Redis Object Cache? |
@tillkruss I am using WP Redis. @pwtyler I noticed that you pushed the pull request related to this issue. You will also need to update the documentation to use a sock URL with unix:/// in it. It won't work otherwise. |
Hi,
I have implemented an open_basedir restriction in my PHP configuration to prevent PHP execution outside of the "/var/www/html/" directory. However, I am perplexed as to why the object cache is attempting to access the sock file as if it were a PHP file.
The text was updated successfully, but these errors were encountered: