Edit report at https://bugs.php.net/bug.php?id=64009&edit=1
ID: 64009 Updated by: cataphr...@php.net Reported by: anilsoneji at gmail dot com Summary: fsockopen function not work on chrooted ubuntu linux os on android device. -Status: Feedback +Status: Not a bug Type: Bug Package: Sockets related Operating System: chrooted ubuntu on android PHP Version: 5.3.20 Block user comment: N Private report: N New Comment: . Previous Comments: ------------------------------------------------------------------------ [2013-01-18 06:08:24] anilsoneji at gmail dot com Problem has been solved. include users mysql and apache (www-data) in group 3003 (aid_inet) ------------------------------------------------------------------------ [2013-01-18 00:48:15] ahar...@php.net 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? ------------------------------------------------------------------------ [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