|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64009 fsockopen function not work on chrooted ubuntu linux os on android device.
Submitted: 2013-01-17 11:56 UTC Modified: 2013-01-18 12:17 UTC
From: anilsoneji at gmail dot com Assigned:
Status: Not a bug Package: Sockets related
PHP Version: 5.3.20 OS: chrooted ubuntu on android
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: anilsoneji at gmail dot com
New email:
PHP Version: OS:


 [2013-01-17 11:56 UTC] anilsoneji at gmail dot com
fsockopen function not work on chrooted ubuntu linux os on android device.

Test script:
$socket = fsockopen("","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)) 
			echo $value[$count].'<br>';		 

Actual result:
2013-01-17 15:52:20: (mod_fastcgi.c.2701) FastCGI-stderr: PHP Warning:  fsockopen(): unable to connect to (Unknown error) in /var/www/test.php on line 2


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-18 00:48 UTC]
-Status: Open +Status: Feedback -Package: PHP options/info functions +Package: Sockets related
 [2013-01-18 00:48 UTC]
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 5038" from the shell?
 [2013-01-18 06:08 UTC] anilsoneji at gmail dot com
Problem has been solved.

include users mysql and apache (www-data) in group 3003 (aid_inet)
 [2013-01-18 12:17 UTC]
-Status: Feedback +Status: Not a bug
 [2013-01-18 12:17 UTC]
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Jan 27 21:03:35 2022 UTC