Hi,

I am using s3fs together with advagg.

Advagg is using this to copy files from tmp to final destination.
drupal_tempnam('public://advagg_js/', 'file_advagg_'), but is giving this error:
Warning: tempnam(): open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/h10802/:/usr/share/php/:/usr/share/pear/:/tmp/) in tempnam() (line 2478 of /var/www/h10802/sites/prod/htdocs/includes/file.inc).

Any ideas what went wrong?

CommentFileSizeAuthor
#4 advagg-2515082-3-openbasedir-fix.patch699 bytesmikeytown2
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jurgen8en’s picture

Changed file advagg.missing.inc

  //$temporary_file = drupal_tempnam($dir, 'file_advagg_');
  $temporary_file = $dir . 'file_advagg_' . md5(getmypid() . microtime(true));

More info: https://www.drupal.org/node/227232

Jurgen8en’s picture

Project: S3 File System » Advanced CSS/JS Aggregation
Component: Documentation » Code
Assigned: Unassigned » Jurgen8en
Category: Support request » Bug report
Priority: Critical » Major
Status: Active » Fixed

  • mikeytown2 committed ed5299d on 7.x-2.x
    Issue #2515082 by mikeytown2, Jurgen8en: fix issue with open_basedir...
mikeytown2’s picture

Assigned: Jurgen8en » Unassigned
Priority: Major » Normal
FileSize
699 bytes

Created this patch based off of your comments and http://php.net/tempnam

It has been committed. Please let me know if it works for you.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.