Dear Sir
I'm writing a small php script to replace xdebug client on my web
application server. my idea is to do remote debug using only a webbrowser.
my script (socket.php):
<?php
$service_port = "9000";
$address = "127.0.0.1";
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
if ($socket < 0) {
echo "socket_create() failed: reason: " . socket_strerror($socket) .
"\n";
exit();
} else {
echo "socket_create = TRUE.\n";
}
echo "Attempting to connect to '$address' on port '$service_port'...";
$result = socket_connect($socket, $address, $service_port);
if ($result < 0) {
echo "socket_connect() failed.\nReason: ($result) " .
socket_strerror($result) . "\n";
exit();
} else {
echo "socket_connect == TRUE.\n";
}
?>
the result:
bossnass:~ # php /www/htdocs/socket.php
socket_create = TRUE.
Attempting to connect to '127.0.0.1' on port '9000'...
Warning: socket_connect() [
http://localhost/phpmanual/function.socket-connect.html]: unable to connect
[111]: Connection refused in /www/htdocs/socket.php on line 14
Call Stack:
0.0006 52608 1. {main}() /www/htdocs/socket.php:0
0.0008 52984 2. socket_connect() /www/htdocs/socket.php:14
socket_connect == TRUE.
Questions:
what's wrong on line 14? if i get an error on line 14 why my if statment
returns true?
How i can send the xdebug client command's using php?
can you send me more info about remote xdebug method?
waiting for reply and for help.
best regards,
Sandrio Fontes
Portugal
scfontes[@]gmail.com
Received on Wed Jun 28 2006 - 00:15:18 BST
This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST