<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hello all,<br>
    I am running Drupal6 running on Debian Lenny with Apache2, PHP5
    (suPHP+suhoshin patch) and mod_security2.<br>
    I have issues with file upload I am getting error message:<br>
    "warning: is_file() [<a
      href="https://new.techplasty.sk/node/add/function.is-file">function.is-file</a>]:
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."<br>
    <br>
    All settings looks fine:<br>
    <br>
    Apache vhost mod_security2 upload dir config:<br>
    SecUploadDir /data/internal/drupal6/sites/www.example.com/files/tmp<br>
    <br>
    php.ini config:<br>
    upload_tmp_dir = /data/www.example.com/tmp/drupal<br>
    open_basedir =
/data/internal/drupal6:/data/www.example.com/www/drupal:/data/www.example.com/tmp/drupal<br>
    include_path =
".:/usr/share/php5:/data/internal/drupal6:/data/www.example.com/www/drupal:/data/www.example.com/tmp/drupal"<br>
    <br>
    Code &lt;?php print file_directory_temp();?&gt;<br>
    is returning path <br>
    <div class="content clear-block"> sites/example.com/files/tmp<br>
      path sites/www.example.com is symbolic link to sites/example.com.
    </div>
    <br>
    Similar setup on Drupal5 is working fine. Any opinion why it is
    uploading files to /tmp directory?<br>
    <br>
    --<br>
    Peter Viskup<br>
  </body>
</html>