|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-05-26 11:11 UTC] chregu@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 10:00:01 2025 UTC |
Description: ------------ 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 @@ #if HAVE_UPLOADPROGRESS +#ifdef P_tmpdir +#define TMPDIR P_tmpdir +#else +#define TMPDIR "/tmp" +#endif + /* {{{ uploadprogress_functions[] */ function_entry uploadprogress_functions[] = { PHP_FE(uploadprogress_get_info, NULL) @@ -34,9 +40,9 @@ /* }}} */ PHP_INI_BEGIN() -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) PHP_INI_END() /* {{{ uploadprogress_module_entry