23 require
'../../main.inc.php';
25 $langs->load(
"admin");
42 if (!function_exists(
'xdebug_is_enabled'))
44 print 'XDebug seems to be not installed. Function xdebug_is_enabled not found.';
50 if (function_exists(
'socket_create'))
52 $address = ini_get(
'xdebug.remote_host') ?ini_get(
'xdebug.remote_host') :
'127.0.0.1';
53 $port = ini_get(
'xdebug.remote_port') ?ini_get(
'xdebug.remote_port') : 9000;
55 print "<strong>Current xdebug setup:</strong><br>\n";
56 print "* Remote debug setup:<br>\n";
57 print 'xdebug.remote_enable = '.ini_get(
'xdebug.remote_enable').
"<br>\n";
58 print 'xdebug.remote_host = '.$address.
"<br>\n";
59 print 'xdebug.remote_port = '.$port.
"<br>\n";
60 print "* Profiler setup ";
61 if (function_exists(
'xdebug_get_profiler_filename'))
print xdebug_get_profiler_filename() ?
"(currently on into file ".xdebug_get_profiler_filename().
")" :
"(currently off)";
62 else print "(currenlty not available)";
64 print 'xdebug.profiler_enable = '.ini_get(
'xdebug.profiler_enable').
"<br>\n";
65 print 'xdebug.profiler_enable_trigger = '.ini_get(
'xdebug.profiler_enable_trigger').
"<br>\n";
66 print 'xdebug.profiler_output_dir = '.ini_get(
'xdebug.profiler_output_dir').
"<br>\n";
67 print 'xdebug.profiler_output_name = '.ini_get(
'xdebug.profiler_output_name').
"<br>\n";
68 print 'xdebug.profiler_append = '.ini_get(
'xdebug.profiler_append').
"<br>\n";
71 echo
"To run a debug session, add parameter<br>";
72 echo
"* XDEBUG_SESSION_START=aname on your URL. To stop, remove cookie XDEBUG_SESSION_START.<br>\n";
73 echo
"To run a profiler session (when xdebug.profiler_enable_trigger=1), add parameter<br>\n";
74 echo
"* XDEBUG_PROFILE=aname on each URL.<br>";
77 print "<strong>Test debugger server (Eclipse for example):</strong><br>\n";
78 $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
79 if (empty($socket)) die(
'Unable to prepare a socket');
83 $client = socket_connect($socket, $address, $port);
86 echo
"Connection established: ".$client.
" - address=".$address.
" port=".$port.
"<br>\n";
87 echo
"There is a Remote debug server at this address.<br>\n";
89 echo
"To be sure this debugger accepts input from your PHP server and xdebug, be sure to have\n";
90 echo
"your php.ini file with this :<br>\n";
91 echo
'<textarea cols="80" rows="16">'.
"xdebug.remote_enable=on
92 xdebug.remote_handle=dbgp
93 xdebug.remote_host=localhost
94 xdebug.remote_port=9000
95 xdebug.profiler_enable=0
96 xdebug.profiler_enable_trigger=1
97 xdebug.show_local_vars=off
98 xdebug.profiler_output_dir=/tmp/xdebug
99 xdebug.profiler_append=0
101 xdebug.trace_enable_trigger=1
102 xdebug.show_mem_delta=1
103 xdebug.trace_output_dir=/tmp/trace
107 echo
'Then check in your debug server (Eclipse), you have setup:<br>
108 XDebug with same port than in php.ini<br>
109 Allow Remote debug=yes or prompt<br>'.
"\n";
112 print socket_strerror(socket_last_error());
113 echo
"Failed to connect to address=".$address.
" port=".$port.
"<br>\n";
114 echo
"There is no Remote debug server at this address.\n";
116 socket_close($socket);
118 print "Can't test if PHPDebug is OK as PHP socket functions are not enabled.";
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
print
Draft customers invoices.