24require
'../../main.inc.php';
41if (!function_exists(
'xdebug_is_enabled')) {
43 print
'XDebug seems to be not installed. Function xdebug_is_enabled not found.';
48print
'<span class="opacitymedium">';
49print $langs->trans(
"ModuleActivatedMayExposeInformation", $langs->transnoentities(
"XDebug"));
54if (function_exists(
'socket_create')) {
55 $address = ini_get(
'xdebug.remote_host') ? ini_get(
'xdebug.remote_host') :
'127.0.0.1';
56 $port = ini_get(
'xdebug.remote_port') ? ini_get(
'xdebug.remote_port') : 9000;
58 print
"<strong>Current xdebug setup:</strong><br>\n";
59 print
"* Remote debug setup:<br>\n";
60 print
'xdebug.remote_enable = '.ini_get(
'xdebug.remote_enable').
"<br>\n";
61 print
'xdebug.remote_host = '.$address.
"<br>\n";
62 print
'xdebug.remote_port = '.$port.
"<br>\n";
63 print
"* Profiler setup ";
64 if (function_exists(
'xdebug_get_profiler_filename')) {
65 print xdebug_get_profiler_filename() ?
"(currently on into file ".xdebug_get_profiler_filename().
")" :
"(currently off)";
67 print
"(currenlty not available)";
70 print
'xdebug.profiler_enable = '.ini_get(
'xdebug.profiler_enable').
"<br>\n";
71 print
'xdebug.profiler_enable_trigger = '.ini_get(
'xdebug.profiler_enable_trigger').
"<br>\n";
72 print
'xdebug.profiler_output_dir = '.ini_get(
'xdebug.profiler_output_dir').
"<br>\n";
73 print
'xdebug.profiler_output_name = '.ini_get(
'xdebug.profiler_output_name').
"<br>\n";
74 print
'xdebug.profiler_append = '.ini_get(
'xdebug.profiler_append').
"<br>\n";
77 print
"To run a debug session, add parameter<br>";
78 print
"* XDEBUG_SESSION_START=aname on your URL. To stop, remove cookie XDEBUG_SESSION_START.<br>\n";
79 print
"To run a profiler session (when xdebug.profiler_enable_trigger=1), add parameter<br>\n";
80 print
"* XDEBUG_PROFILE=aname on each URL.<br>";
83 print
"<strong>Test debugger server (Eclipse for example):</strong><br>\n";
84 $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
86 die(
'Unable to prepare a socket');
91 $client = socket_connect($socket, $address, $port);
93 print
"Connection established: ".$client.
" - address=".$address.
" port=".$port.
"<br>\n";
94 print
"There is a Remote debug server at this address.<br>\n";
96 print
"To be sure this debugger accepts input from your PHP server and xdebug, be sure to have\n";
97 print
"your php.ini file with this :<br>\n";
98 print
'<textarea cols="80" rows="16">'.
"xdebug.remote_enable=on
99xdebug.remote_handle=dbgp
100xdebug.remote_host=localhost
101xdebug.remote_port=9000
102xdebug.profiler_enable=0
103xdebug.profiler_enable_trigger=1
104xdebug.show_local_vars=off
105xdebug.profiler_output_dir=/tmp/xdebug
106xdebug.profiler_append=0
108xdebug.trace_enable_trigger=1
109xdebug.show_mem_delta=1
110xdebug.trace_output_dir=/tmp/trace
114 print
'Then check in your debug server (Eclipse), you have setup:<br>
115 XDebug with same port than in php.ini<br>
116 Allow Remote debug=yes or prompt<br>'.
"\n";
119 print socket_strerror(socket_last_error());
120 print
" - Failed to connect to address=".$address.
" port=".$port.
"<br>\n";
121 print
"There is no Remote debug server at this address.\n";
123 socket_close($socket);
125 print
"Can't test if PHPDebug is OK as PHP socket functions are not enabled.";
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
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.