<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    On 06/08/2011 01:07 AM, Peter Viskup wrote:
    <blockquote cite="mid:4DEEAF47.2070200@gmail.com" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      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() [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."<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>
    </blockquote>
    <br>
    It was just filesystem permission issue. The SecUploadDir directory
    must be writable by Apache user. Just overlooked that and after
    fixing this the uploads were using the directory specified in Apache
    vhost config file.<br>
    <br>
    --<br>
    Peter Viskup<br>
  </body>
</html>