|  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [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-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 00:01:33 2024 UTC