#35380 [NEW]: Provide information about the current temporary directory

From: Date: Fri, 25 Nov 2005 03:28:35 +0000
Subject: #35380 [NEW]: Provide information about the current temporary directory
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-88895@lists.php.net to get a copy of this message
From:             daniel dot gorski at develnet dot org
Operating system: Any
PHP version:      5CVS-2005-11-25 (snap)
PHP Bug Type:     Feature/Change Request
Bug description:  Provide information about the current temporary directory

Description:
------------
It is not possible to programatically get the information about the
directory used by PHP where to store temporary files - if the session save
path is not set in the php.ini (default). There is no chance to get an
unusal path (unlike /tmp/) for temporary directory on OSes like Windows.

Creating a _single_ temporary file by e.g. tmpfile() doesn't solve the
problem if an additional temporary structure, e.g. for caching purposes,
needs to be created beneath the temp directory and an userland method
requires the path on which it can work on.

If running on Windows the location of the temporary directory might
differ. The code - or the - recognition of it is already solved in PHP:

http://lxr.php.net/source/php-src/main/php_open_temporary_file.c#161

But there is no way to get this information whilst a script is running.


Reproduce code:
---------------
-none-

Expected result:
----------------
A constant or function that reflects/returns the status of PHPs internal
php_tmpdir()/php_get_temporary_directory() for the current running script.

Actual result:
--------------
not available, but thank you for fixing in advance.

-- 
Edit bug report at http://bugs.php.net/?id=35380&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=35380&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35380&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35380&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=35380&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=35380&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=35380&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=35380&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=35380&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=35380&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=35380&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=35380&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=35380&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=35380&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=35380&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=35380&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=35380&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=35380&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=35380&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=35380&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=35380&r=mysqlcfg


Thread (9 messages)

« previous php.bugs (#88895) next »