From:             philip at cornado dot com
Operating system: all
PHP version:      5CVS-2003-06-08 (dev)
PHP Bug Type:     Feature/Change Request
Bug description:  Make temporary_directory available in userland

How about making the result from get_temporary_directory() available in
user land, most likely as a constant named TEMPORARY_DIRECTORY  This would
be useful in that we'd know where this is, in both Windows and *nix.  The
code that defines the internal variable temporary_directory is here:

http://lxr.php.net/source/php4/main/php_open_temporary_file.c#164

I'm not a devel guy, but the following hack seems mildly appropriate:

REGISTER_STRING_CONSTANT("TEMPORARY_DIRECTORY", get_temporary_directory(),
strlen(get_temporary_directory()), 0);

Not sure where to put it though, or if it's fully correct (doubtful), but
please consider this idea as it would be nice.

One *possible* concern is security but I think it's worth it, *maybe*
disable this option in safe_mode.  It's not like the TEMP directory is a
big secret, nor is viewing various related directives like
session.save_path and upload_tmp_dir.
-- 
Edit bug report at http://bugs.php.net/?id=24087&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=24087&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=24087&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24087&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24087&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24087&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24087&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24087&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24087&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24087&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24087&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24087&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24087&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24087&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24087&r=gnused

Reply via email to