View Issue Details

IDProjectCategoryView StatusLast Update
0000419XdebugUncategorizedpublic2020-03-12 17:16
Reporterguenter Assigned To 
Status closedResolutionfixed 
Summary0000419: make use of P_tmpdir if defined instead of hardcoded '/tmp'

I think its a good idea to make use of P_tmpdir if its defined in the OS headers - this would help on NetWare since there the default is 'sys:/tmp'.
I've checked on my Linux box that it is defined there too as '/tmp'.

Additional Information

--- xdebug.c.orig Wed Jul 18 19:33:52 2007
+++ xdebug.c Fri Aug 31 12:14:14 2007
@@ -71,6 +71,12 @@
#include "xdebug_superglobals.h"
#include "usefulstuff.h"

+#ifdef P_tmpdir
+#define XDEBUG_TEMP_DIR P_tmpdir
+#define XDEBUG_TEMP_DIR "/tmp"
/ execution redirection functions /
zend_op_array (old_compile_file)(zend_file_handle file_handle, int type TSRMLS_DC);
xdebug_compile_file(zend_file_handle, int TSRMLS_DC);
@@ -252,7 +258,7 @@
Debugger settings */
STD_PHP_INI_BOOLEAN("xdebug.auto_trace", "0", PHP_INI_ALL, OnUpdateBool, auto_trace, zend_xdebug_globals, xdebug_globals)

  • STD_PHP_INI_ENTRY("xdebug.trace_output_dir", "/tmp", PHP_INI_ALL, OnUpdateString, trace_output_dir, zend_xdebug_globals, xdebug_globals)
  • STD_PHP_INI_ENTRY("xdebug.trace_output_dir", XDEBUG_TEMP_DIR, PHP_INI_ALL, OnUpdateString, trace_output_dir, zend_xdebug_globals, xdebug_globals)
    STD_PHP_INI_ENTRY("xdebug.trace_output_name", "trace.%c", PHP_INI_ALL, OnUpdateString, trace_output_name, zend_xdebug_globals, xdebug_globals)
    #if ZEND_EXTENSION_API_NO < 90000000
    STD_PHP_INI_ENTRY("xdebug.trace_format", "0", PHP_INI_ALL, OnUpdateInt, trace_format, zend_xdebug_globals, xdebug_globals)
    @@ -296,7 +302,7 @@

    / Profiler settings /
    STD_PHP_INI_BOOLEAN("xdebug.profiler_enable", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, profiler_enable, zend_xdebug_globals, xdebug_globals)

  • STD_PHP_INI_ENTRY("xdebug.profiler_output_dir", "/tmp", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateString, profiler_output_dir, zend_xdebug_globals, xdebug_globals)
  • STD_PHP_INI_ENTRY("xdebug.profiler_output_dir", XDEBUG_TEMP_DIR, PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateString, profiler_output_dir, zend_xdebug_globals, xdebug_globals)
    STD_PHP_INI_ENTRY("xdebug.profiler_output_name", "cachegrind.out.%p", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateString, profiler_output_name, zend_xdebug_globals, xdebug_globals)
    STD_PHP_INI_BOOLEAN("xdebug.profiler_enable_trigger", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, profiler_enable_trigger, zend_xdebug_globals, xdebug_globals)
    STD_PHP_INI_BOOLEAN("xdebug.profiler_append", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, profiler_append, zend_xdebug_globals, xdebug_globals)
TagsNo tags attached.
Operating Systemall
PHP Version5.2.6



2009-12-29 15:58

administrator   ~0001229

It's only netware that has P_tmpdir; what might help is to use PHP's php_get_temporary_directory() but that is really tricky to use as default for INI settings it seems.


2009-12-29 17:29

reporter   ~0001232

nope - its Linux standard too - see:
also see f.e. this PHP core file:;view=markup
where P_tmpdir is used too; and even Win32 seems to have it defined:

Anyway, you loose nothing with my patch since P_tmpdir is only used if defined.


2009-12-29 17:41

administrator   ~0001233

Ah ha, didn't know that. Fixed in revision 3179 and thanks!

Issue History

Date Modified Username Field Change
2008-11-08 18:10 guenter New Issue
2009-12-29 15:58 derick Note Added: 0001229
2009-12-29 17:29 guenter Note Added: 0001232
2009-12-29 17:41 derick Note Added: 0001233
2009-12-29 17:41 derick Status new => closed
2009-12-29 17:41 derick Resolution open => fixed
2020-03-12 16:55 derick Severity trivial => feature
2020-03-12 17:16 derick Category Feature/Change request => Uncategorized