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
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/
Hello,
I have made the checks that you mention in point 1 and all the permissions are correct. I attach a screenshot.
Regards
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.
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"));
My IP is: 43.134.198.103
Please provide your website SFTP/FTP access in below private message box.
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"));
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
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.
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
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/