Edit report at https://bugs.php.net/bug.php?id=64009&edit=1
ID: 64009 Updated by: ahar...@php.net Reported by: anilsoneji at gmail dot com Summary: fsockopen function not work on chrooted ubuntu linux os on android device. -Status: Open +Status: Feedback Type: Bug -Package: PHP options/info functions +Package: Sockets related Operating System: chrooted ubuntu on android PHP Version: 5.3.20 Block user comment: N Private report: N New Comment: I have a similar setup on my own tablet, so I can have a go at replicating this over the weekend, but to ask the obvious question first: are you sure there's a socket server listening on the loopback interface on port 5038? What happens if you "telnet 127.0.0.1 5038" from the shell? Previous Comments: ------------------------------------------------------------------------ [2013-01-17 11:56:25] anilsoneji at gmail dot com Description: ------------ fsockopen function not work on chrooted ubuntu linux os on android device. Test script: --------------- <?php $socket = fsockopen("127.0.0.1","5038", $errno, $errstr, 1); fputs($socket, "Action: Login\r\n"); fputs($socket, "UserName: admin\r\n"); fputs($socket, "Secret: devindia\r\n\r\n"); fputs($socket, "Action: Command\r\n"); fputs($socket, "Command: reload\r\n\r\n"); fputs($socket, "Action: Logoff\r\n\r\n"); while (!feof($socket)) { fgets($socket,200); echo $value[$count].'<br>'; } fclose($socket); ?> Actual result: -------------- 2013-01-17 15:52:20: (mod_fastcgi.c.2701) FastCGI-stderr: PHP Warning: fsockopen(): unable to connect to 127.0.0.1:5038 (Unknown error) in /var/www/test.php on line 2 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64009&edit=1