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.
Hey there,
Thanks for your patience and cooperation.
I checked this out but so far I couldn't find a fix for it. I asked my colleagues to have a look at this issue in order to see if there's anything I'm missing.
I'll come back to you here as soon as one of my colleagues reply back to me (which it shouldn't take long).
Best,
Mateus.
Hi,
This ticket has been escalated to our 2nd tier of support, where our 2nd tier specialists will take a deeper look at this issue and will try to find a solution.
I will get back to you as soon as I get an answer from them.
Best regards,
Mateus
Ok sounds great and thank you for your help on this issue.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi there
I'm just reviewing escalated threads and I realise this ticket was overlooked, let me apologise for that.
Are you still seeing the PHP warnings in your logs?
If that's the case we would need to modify the Types plugin code to log the image URLs passing through the code where the warnings are generated to see the file paths being passed.
At face value, it looks like there are images in the site root directory, and dirname extracts the path of the parent directory which is then evaluated by is_writable.
Please let me know if this is still occurring, and—if so—which site we can work on to use a modified version of Types and monitor the logs.
Once again, sorry that this slipped through the net.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
I have set up some logging on your site to check the image URLs that are being processed to see if I can identify the problem.
I'll leave that running for a little while to see what it generates.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hello again.
I've investigated based upon the information that was being output to the debug.log by the changes I made to the Types plugin on your site.
It looks like the problem arose because of entries in wp_postmeta for an image field (customer review image) with no values, and I have deleted the handful of such entries. Since then I haven't spotted the same notices, and I suspect the problem is resolved, but let's leave this in place over the weekend with the logging active, and if on Monday I still don't see any such entries we can be confident it is.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
No further entries in the logs, so that appears to have resolved the problem.
I have turned logging back off and removed the plugins I used for debugging.
Thanks for your patience while we investigated this.