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.
if (!file_exists('./'. $file->filepath)) {
// Missing file.
$errors[] = $file->filepath;
continue;
}
Those lines assume files are located relative to drupal site dir. My files are in /some_private_location/here/.
I patched the above like so:
if (!file_exists($file->filepath)) {
if (!file_exists('./'. $file->filepath)) {
// Missing file.
$errors[] = $file->filepath;
continue;
}
}
But now 'file_move()' fails. It seems that drupal 6 doesn't really support private files where the file directory is outside the drupal root.
The description here confirms that http://api.drupal.org/api/drupal/includes%21file.inc/function/file_creat...
file_create_path is used to help make a drupal ONLY path... :(
Any ideas how we can fix this? Avoid using drupal PHP functions and use PHP core functions instead?