Skip Navigation

[Cerrado] Php warning calling types_render_field with an image field

This support ticket is created hace 2 años, 9 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Este tema contiene 10 respuestas, tiene 2 mensajes.

Última actualización por Luo Yang hace 2 años, 8 meses.

Asistido por: Luo Yang.

Autor
Mensajes
#2306865

Hi,
I have a lot of php warning when calling types_render_field with an image field.
I can upload images in that custom field and they are saved correctly in the uploads folder.

PHP Warning: is_writable(): open_basedir restriction in effect. File(/www/site_root_dir_here/) is not within the allowed path(s): (/var/www/site_root_dir_here/web:/var/www/site_root_dir_here/private:/var/www/site_root_dir_here/tmp:/var/www/site_root_dir_here/web:/srv/www/site_root_dir_here/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom) in /www/site_root_dir_here/web/wp-content/plugins/types/vendor/toolset/types/embedded/views/image.php on line 392

I have reviewed the blog queries about this type of error, I see that most of them are unresolved.
I have consulted the solution of this post
https://toolset.com/forums/topic/i-get-constant-errors-in-the-log/
with my system administrator but he tells me that it is impossible to give those permissions to the root directory.

Regards

#2307361

Hello,

According to your debug logs, I have checked the source codes of Types plugin file:
plugins/types/vendor/toolset/types/embedded/views/image.php on line 392:

if ( ! is_writable( $dir ) || ! is_dir( $dir ) ) {

It is using PHP built-in function is_writable() to check if the directory is writeable:
enlace oculto
but in your web server, conducts the errors message you mentioned above.

I suggest you check these:
1) Dashboard-> Tools-> Site Health-> Info, in section "Filesystem Permissions", check if your webserver can satisfy WordPress installation
2) If not, you can follow WP document to fix it:
https://wordpress.org/support/article/changing-file-permissions/

#2308335
fer-sitehealth.jpg

Hello,
I have made the checks that you mention in point 1 and all the permissions are correct. I attach a screenshot.

Regards

#2309821

Since it is a server issue, please provide a test site with the same problem, fill below private message box with login details and FTP access, I need a live website to test and debug it.

#2310929

Your website is using 30+ plugins(including must-use and drop-in plugins), in order to debug the problem, I need to deactivate all other plugins, so the FTP/SFTP access is required, if you can not provide FTP/SFTP access, please provide a copy of your website in below private message box, you can put the package files in your own google drive disk, share the link only, also point out the problem page URL and view URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

Where and how do you put the custom PHP codes in your website?
$image = types_render_field('fimagen2021',array("size"=>"deportista-ficha"));

#2311893

My IP is: 43.134.198.103

Please provide your website SFTP/FTP access in below private message box.

#2312781

I have tried the FTP access you provided, but it is an empty folder, please check it, make sure it is a valid FTP access acount.

And where can I edit your custom PHP codes?
$imagen = types_render_field('fimagen2021',array("size"=>"deportista-ficha"));

#2312951

Sorry, the ftp is only:
ovhdev3.filmac.com
And the PHP code is in:
/wp-content/themes/proyectofer/single-deportistas.php

Thank you and sorry for the inconvenience

#2313957

I have tried again the FTP access you provided using host "ovhdev3.filmac.com", but can only see a blank folder.
please check it, make sure it is a valid FTP access account.

#2314093

Hi,
Sorry for the inconvenience. The system administrator tells me that the ftp works correctly, it may be because of the ftp client that it needs explicit FTP over TLS.

Regards

#2315875
ftP.jpg

No, it does not work, see my screenshot enlace oculto, I can see only an empty folder.

So can not debug in your website, if you need more assistance for it, please provide a copy of your website in below private message box, you can put the package files in your own google drive disk, share the link only, I need to test and debug it in my localhost. thanks
https://toolset.com/faq/provide-supporters-copy-site/

El debate ‘[Cerrado] Php warning calling types_render_field with an image field’ está cerrado y no admite más respuestas.