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

Deciphered’s picture

Status: Active » Postponed (maintainer needs more info)

Hi,

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.

HeNuS_spb’s picture

Hi,
Most important settings in php.ini:
safe_mode On
safe_mode_gid On

Deciphered’s picture

HeNuS_spb,

I'm more interested in what version of PHP you are using, ie. 5.2, 5.3, etc.

Cheers,
Deciphered.

HeNuS_spb’s picture

Drupal 6.14

PHP Version 5.2.4

socceronly’s picture

Same 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.

Deciphered’s picture

socceronly,

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.

Deciphered’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (won't fix)

No longer supporting Drupal 6 issues for this module.