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.
At some servers there is such errors.
The reason seems to be that the function filefield_paths_file_move pass to file_create_path the content of the variable $dirs, which is supposed to be a subdirectory of the files directory. Function file_create_path tries first to check whether the path is contained either within the files directory or within the temporary directory, only at the end it tries to prefix the path with the files directory location.
The path passed to file_create_path should be prefixed with the files directory location to avoid unnecessary lookups and warnings:
function filefield_paths_file_move(&$file, $replace = FILE_EXISTS_RENAME) {
$dest = _filefield_paths_strip_path(dirname($file['filepath']['new']));
foreach (explode('/', $dest) as $dir) {
$dirs[] = $dir;
$path = file_create_path(file_directory_path() .'/'. implode($dirs, '/'));
Comments
Comment #1
Deciphered CreditAttribution: Deciphered commentedHi,
Haven't been able to reproduce the issue. Can you provide some information on the configuration of the server you are experiencing this issue on? It's likely the issue comes down to PHP version.
Cheers,
Deciphered.
Comment #2
HeNuS_spb CreditAttribution: HeNuS_spb commentedHi,
Most important settings in php.ini:
safe_mode On
safe_mode_gid On
Comment #3
Deciphered CreditAttribution: Deciphered commentedHeNuS_spb,
I'm more interested in what version of PHP you are using, ie. 5.2, 5.3, etc.
Cheers,
Deciphered.
Comment #4
HeNuS_spb CreditAttribution: HeNuS_spb commentedDrupal 6.14
PHP Version 5.2.4
Comment #5
socceronly CreditAttribution: socceronly commentedSame thing here.
And this is a default Acquia Drupal install that I have used the same install files on a few sites on the same server.
This one.... poof. Can't upload a logo using Marina theme.
Comment #6
Deciphered CreditAttribution: Deciphered commentedsocceronly,
I don't believe FileField Paths has any effect on the theme logo upload, though I will have to confirm that. Can you confirm that the issue is no present without FileField Paths installed (assuming you do have FileField Paths installed).
Cheers,
Deciphered.
Comment #7
Deciphered CreditAttribution: Deciphered commentedNo longer supporting Drupal 6 issues for this module.