[support] Problem with uploading files on Drupal6

Peter Viskup skupko.sk at gmail.com
Tue Jun 7 23:07:51 UTC 2011


Hello all,
I am running Drupal6 running on Debian Lenny with Apache2, PHP5 
(suPHP+suhoshin patch) and mod_security2.
I have issues with file upload I am getting error message:
"warning: is_file() [function.is-file 
<https://new.techplasty.sk/node/add/function.is-file>]: open_basedir 
restriction in effect. File(/tmp/php6sDem4) is not within the allowed 
path(s): 
(/data/internal/drupal6:/data/www.example.com/www/drupal:/data/www.example.com/tmp/drupal) 
in /data/internal/drupal6/includes/image.inc on line 117."

All settings looks fine:

Apache vhost mod_security2 upload dir config:
SecUploadDir /data/internal/drupal6/sites/www.example.com/files/tmp

php.ini config:
upload_tmp_dir = /data/www.example.com/tmp/drupal
open_basedir = 
/data/internal/drupal6:/data/www.example.com/www/drupal:/data/www.example.com/tmp/drupal
include_path = 
".:/usr/share/php5:/data/internal/drupal6:/data/www.example.com/www/drupal:/data/www.example.com/tmp/drupal"

Code <?php print file_directory_temp();?>
is returning path
sites/example.com/files/tmp
path sites/www.example.com is symbolic link to sites/example.com.

Similar setup on Drupal5 is working fine. Any opinion why it is 
uploading files to /tmp directory?

--
Peter Viskup
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20110608/18e5e2db/attachment.html 


More information about the support mailing list