[drupal-devel] [bug] use upload_tmp_dir as default for
FILE_DIRECTORY_TEMP
m3avrck
drupal-devel at drupal.org
Tue Sep 6 20:40:33 UTC 2005
Issue status update for
http://drupal.org/node/26249
Post a follow up:
http://drupal.org/project/comments/add/26249
Project: Drupal
Version: 4.6.2
Component: base system
Category: bug reports
Priority: normal
Assigned to: Anonymous
Reported by: danielc
Updated by: m3avrck
Status: patch (code needs review)
Works for me as well. Question though, Drupal Admin > Settings allows a
user to specify a temp directory, does this interfere with that? This
patch defines a tmp directory but Drupal Admin > Settings allows
another one to be defined. Haven't looked into this but this could be a
deeper issue.
If this isn't an issue, then +1 from me.
m3avrck
Previous comments:
------------------------------------------------------------------------
Sat, 02 Jul 2005 20:03:13 +0000 : danielc
In includes/file.inc, the FILE_DIRECTORY_TEMP constant is set as
follows:
define('FILE_DIRECTORY_TEMP', IS_WINDOWS ? 'c:\\windows\\temp' :
'/tmp');
It's wiser to set it to php.ini's upload_tmp_dir value:
define('FILE_DIRECTORY_TEMP', ini_get('upload_tmp_dir'));
I noticed this issue because I'm running Windows 2000, which defaults
to an install directory of c:\winnt, not c:\windows. When I go to the
"Settings" administration page, (while running PHP 5.0.5-dev) I got the
following error at the top of the page:
warning: mkdir() [function.mkdir]: No such file or directory in
...\includes\file.inc on line 86.
------------------------------------------------------------------------
Thu, 07 Jul 2005 13:05:36 +0000 : AlberT75
I had the same problem when installed on a host with open_base_dir
enabled (it should be on a decent hoster machine)...
------------------------------------------------------------------------
Sat, 03 Sep 2005 21:42:49 +0000 : crunchywelch
Attachment: http://drupal.org/files/issues/file.inc.patch (635 bytes)
Here is a patch for this, seems like a good idea to me, works on a new
HEAD install on SUSe Linux.
------------------------------------------------------------------------
Sat, 03 Sep 2005 21:43:17 +0000 : crunchywelch
change status
More information about the drupal-devel
mailing list