Passer la navigation

[Résolu] PHP message: PHP Warning: on my server logs

Ce fil est résolu. Voici une description du problème et la solution proposée.

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 support ticket is created Il y a 2 years, 10 months. There's a good chance that you are reading advice that it now obsolete.

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 -

Fuseau horaire du supporter : America/Sao_Paulo (GMT-03:00)

Ce sujet contient 22 réponses, a 3 voix.

Dernière mise à jour par Nigel Il y a 2 years, 4 months.

Assisté par: Mateus Getulio.

Auteur
Publications
#2627701

Mateus Getulio
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Sao_Paulo (GMT-03:00)

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.

#2627801

Mateus Getulio
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Sao_Paulo (GMT-03:00)

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

#2629947

Ok sounds great and thank you for your help on this issue.

#2677852

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+01: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.

#2677867
Screenshot 2024-01-10 at 8.55.29 AM.png

Hi Nigel thank you for the response, we are still receiving these alerts in the log files. Only for 1 website, it seems that rousseaumouthpieces.com is not showing these errors, even though they are set up similarly. Let me know what you need me to do and I will do it so we can close this issue 🙂

#2677966

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+01: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.

#2678046

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+01: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.

#2678431

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+01: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.