Home › Toolset Professional Support › [Resolved] PHP message: PHP Warning: on my server logs
Problem:
Upon reviwing the site's logs customer found that the following error was repeating often:
2023/07/12 15:41:21 [error] 232#232: *14491 FastCGI sent in stderr: "PHP message: PHP Warning: is_writable(): open_basedir restriction in effect. File(/www/) is not within the allowed path(s): (/deploy:/:/usr/share:/tmp) in /www/wp-content/plugins/types/vendor/toolset/types/embedded/views/image.php on line 390" while reading response header from upstream, client: xx, server: domain.com, request: "GET /product/elite-bb-clarinet-mouthpiece/ HTTP/2.0", upstream: "fastcgi://unix:/var/run/php8.1-fpm-php.sock:", host: "domain.com:21852"
Solution:
Our 2nd tier team detected that the problem relates to processing the image field wpcf-customer-review-image. Checking the entries in wp_postmeta they noticed that there were multiple entries with the key but no value. After fixing this, the error ceased.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | 9:00 – 12:00 | - |
- | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | 13:00 – 18:00 | - |
Supporter timezone: America/Sao_Paulo (GMT-03:00)
This topic contains 22 replies, has 3 voices.
Last updated by Nigel 1 year ago.
Assisted by: Mateus Getulio.
I am trying to: Fix the error im getting on my server logs.
Link to a page where the issue can be seen: its the server logs
I expected to see: No errors
Instead, I got:
2023/07/12 15:41:21 [error] 232#232: *14491 FastCGI sent in stderr: "PHP message: PHP Warning: is_writable(): open_basedir restriction in effect. File(/www/chedeville_497/) is not within the allowed path(s): (/www/chedeville_497/public:/www/chedeville_497/mysqleditor:/www/chedeville_497/web:/www/chedeville_497/deploy:/www/chedeville_497/deployment:/www/chedeville_497/deployments:/usr/share:/tmp) in /www/chedeville_497/public/wp-content/plugins/types/vendor/toolset/types/embedded/views/image.php on line 390" while reading response header from upstream, client: 66.249.70.110, server: chedeville.com, request: "GET /product/elite-bb-clarinet-mouthpiece/ HTTP/2.0", upstream: "hidden link:", host: "chedeville.com:21852"
Hello there,
Thanks for your contact.
Have you checked any trigger for this issue? It looks like a server configuration issue. Please check file and folder permissions - typically Folders should have 755 permission and Files have 644.
Please also contact your hosting support and ask them to confirm file and folder permissions and that opendir() function is enabled on the server, and if possible to disable the open_basedir directory restriction.
Looking forward to your reply. Thank you.
Hosting Support Techs Response:
"OK, according to the error, it is asking to add /www/chedeville_497/ in the allowed path, however, for security reasons, it is not possible to add that one as it can make your site vulnerable"
"I had just checked with the team. As I mentioned, we cannot add /www/chedeville_497/ in the allowed paths, you would need to add the PHP loadable in a subdirectory within /www/chedeville_497/, like /www/chedeville_497/includes"
Hi there,
Thanks for your reply.
Could you please ask your host to add our plugin path to the PHP/open_basedir path, then restart PHP/NGINX and see if the error keeps showing up?
Keep us posted. Thank you.
The error itself indicates that the site's root folder is within the allowed paths on the open_basedir directives.
The site's root path:
/www/chedeville_497/public
The plugin's path:
/www/chedeville_497/public/wp-content/plugins/types/
So every subpath under "/www/chedeville_497/public" is automatically allowed in the open_basedir directives.
Here the plugin is trying to write in the parent folder under:
/www/chedeville_497/
Which we can't allow
I believe there is a conflict with Views and Types Plugin
From Server tech:
This is the live with the error
chedeville@xdj-chedeville-chedstaging-staging:~/public$ cat -n /www/chedeville_497/public/wp-content/plugins/types/vendor/toolset/types/embedded/views/image.php | grep 390
390 if ( ! is_writable( $dir ) || ! is_dir( $dir ) ) {
chedeville@xdj-chedeville-chedstaging-staging:~/public$
Maybe that variable $dir is configured to the environmental variable of HOME. Maybe it should be set to PWD. Just assuming here
This error is now showing on our staging site so if you need to dig in:
2023/07/13 17:35:22 [error] 34831#34831: *1183 FastCGI sent in stderr: "PHP message: PHP Warning: is_writable(): open_basedir restriction in effect. File(/www/chedeville_497/) is not within the allowed path(s): (/www/chedeville_497/public:/www/chedeville_497/mysqleditor:/www/chedeville_497/web:/www/chedeville_497/deploy:/www/chedeville_497/deployment:/www/chedeville_497/deployments:/usr/share:/tmp) in /www/chedeville_497/public/wp-content/plugins/types/vendor/toolset/types/embedded/views/image.php on line 390" while reading response header from upstream, client: 47.196.23.218, server: stg-chedeville-chedstaging.kinsta.cloud, request: "GET /product/umbra-bb-clarinet-mouthpiece/ HTTP/2.0", upstream: "<em><u>hidden link</u></em>:", host: "stg-chedeville-chedstaging.kinsta.cloud:23082", referrer: "<em><u>hidden link</u></em>"
If you need login credentials id be happy to give them.
When I turn off either Types or Views the Error goes away.
Hello,
I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Our Debugging Procedures
I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.
Privacy and Security Policy
We have strict policies regarding privacy and access to your information. Please see:
https://toolset.com/privacy-policy-and-gdpr-compliance/#data-shared-with-our-support
**IMPORTANT**
- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link
Please, let me know if you need any additional details. Have a nice day.
2023/07/18 22:29:36 [error] 59254#59254: *58004 FastCGI sent in stderr: "PHP message: PHP Warning: is_writable(): open_basedir restriction in effect. File(/www/chedeville_497/) is not within the allowed path(s): (/www/chedeville_497/public:/www/chedeville_497/mysqleditor:/www/chedeville_497/web:/www/chedeville_497/deploy:/www/chedeville_497/deployment:/www/chedeville_497/deployments:/usr/share:/tmp) in /www/chedeville_497/public/wp-content/plugins/types/vendor/toolset/types/embedded/views/image.php on line 390" while reading response header from upstream, client: 66.249.70.107, server: chedeville.com, request: "GET /product/umbra-bb-clarinet-mouthpiece/ HTTP/2.0", upstream: "hidden link:", host: "chedeville.com:21852"
Hi there,
Thanks for providing the credentials.
Just to make sure, do we have your authorization to make a copy of the website and migrate it into another server? In order to perform more complex tests without compromising the live production.
Please keep us posted about it. Thank you.
Yes, you can run the test as you need as long as the live site is not effected.
Hi there,
Thanks for your reply.
We tried to get a website copy using Duplicator, but it seems the plugin is blocked by the hosting provider: hidden link. Therefore, may I kindly ask you to:
#1 provide us with a website package
or
#2 set a staging website where we can check this issue without the risk of compromise the live website
Your next reply will bi private in both cases, so that we can receive the new info safely.
Please let us know. Thank you.
Regards,
Mateus.
Hi there,
Thanks for creating this copy of the website.
Were you able to experience the issue in the logs for the staging version?
Furthermore, one important thing to ask is about the trigger of this issue. What specific action (or actions) generates the server log error?
Could you please monitor the actions taken on the website, perhaps using the Activity Log plugin https://wordpress.org/plugins/aryo-activity-log/, so that we can take a better idea of what exactly is causing the issue?
Please let us know. Thank you.
I have added the Activity Log to the Live Site and will see what we get 🙂 thank you
2023/07/27 00:35:19 [error] 91465#91465: *4283 FastCGI sent in stderr: "PHP message: PHP Warning: is_writable(): open_basedir restriction in effect. File(/www/chedeville_497/) is not within the allowed path(s): (/www/chedeville_497/public:/www/chedeville_497/mysqleditor:/www/chedeville_497/web:/www/chedeville_497/deploy:/www/chedeville_497/deployment:/www/chedeville_497/deployments:/usr/share:/tmp) in /www/chedeville_497/public/wp-content/plugins/types/vendor/toolset/types/embedded/views/image.php on line 390" while reading response header from upstream, client: 52.167.144.32, server: chedeville.com, request: "GET /product/elite-bb-clarinet-mouthpiece/ HTTP/2.0", upstream: "<em><u>hidden link</u></em>:", host: "chedeville.com:21852"
Still getting this, and there is no trigger that happened at this time. According to the Activity Log. It did record what is on the image, which it is attached.