|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58702 simple detection of tmpdir
Submitted: 2009-05-22 22:49 UTC Modified: 2009-05-26 11:11 UTC
From: Assigned:
Status: Closed Package: uploadprogress (PECL)
PHP Version: 5.2.9 OS: all
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
19 - 18 = ?
Subscribe to this entry?

 [2009-05-22 22:49 UTC]
I think we could make use of P_tmpdir define if available to preset the tmpdir properly depending on the system.

Reproduce code:
--- uploadprogress.c.orig	Sun Mar 15 20:41:46 2009
+++ uploadprogress.c	Fri May 22 17:28:28 2009
@@ -25,6 +25,12 @@
+#ifdef P_tmpdir
+#define TMPDIR P_tmpdir
+#define TMPDIR "/tmp"
 /* {{{ uploadprogress_functions[] */
 function_entry uploadprogress_functions[] = {
     PHP_FE(uploadprogress_get_info, NULL)
@@ -34,9 +40,9 @@
 /* }}} */
-PHP_INI_ENTRY("uploadprogress.file.filename_template",    "/tmp/upt_%s.txt",            PHP_INI_ALL,    NULL)
-PHP_INI_ENTRY("uploadprogress.file.contents_template",    "/tmp/upload_contents_%s",    PHP_INI_ALL,    NULL)
-PHP_INI_ENTRY("uploadprogress.get_contents",            "0",                        PHP_INI_ALL,    NULL)
+PHP_INI_ENTRY("uploadprogress.file.filename_template", TMPDIR "/upt_%s.txt",         PHP_INI_ALL, NULL)
+PHP_INI_ENTRY("uploadprogress.file.contents_template", TMPDIR "/upload_contents_%s", PHP_INI_ALL, NULL)
+PHP_INI_ENTRY("uploadprogress.get_contents",           "0",                          PHP_INI_ALL, NULL)
 /* {{{ uploadprogress_module_entry


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-26 11:11 UTC]
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

Applied and committed to cvs. thx
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Feb 19 20:01:26 2020 UTC