Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In field_file_check_directory() I've added dpm($directory)
.
For FileFields I got a normal output
/var/www/vhosts/example.com/files
However for ImageField I got the picture attached.
Comment | File | Size | Author |
---|---|---|---|
#2 | 420666_filefield_check_dir_3.patch | 889 bytes | amitaibu |
snap1.png | 34.67 KB | amitaibu |
Comments
Comment #1
amitaibuMy problem by the way is the I get a
warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/var/www/vhosts/XXX.com) is not within the allowed path(s): (/var/www/vhosts/XXX.com/httpdocs:/tmp:/var/www/vhosts/XXX.com/private)
Comment #2
amitaibuPatch allow checking only directories inside the file path.
Comment #3
quicksketchThanks Amitaibu, checked with private and public files and it works as expected. Thanks for the nice fix!