dzedward Posted April 29, 2008 Share Posted April 29, 2008 What would be a reason why a socket won't bind to my public IP, it will only bind to 127.0.0.1.. My actual IP is live and points to my domain. I forwarded the port im listening on to my comp, and allowed it in my firewall. I just don't get it. Link to comment https://forums.phpfreaks.com/topic/103357-php-socket/ Share on other sites More sharing options...
trq Posted April 29, 2008 Share Posted April 29, 2008 Are you trying to access it from within the same lan? If so, does the ip resolv from within said lan? eg; Can you ping it? Link to comment https://forums.phpfreaks.com/topic/103357-php-socket/#findComment-529330 Share on other sites More sharing options...
dzedward Posted April 29, 2008 Author Share Posted April 29, 2008 I can't even ping it.. why would that be? 66.74.14.110 Link to comment https://forums.phpfreaks.com/topic/103357-php-socket/#findComment-529333 Share on other sites More sharing options...
trq Posted April 29, 2008 Share Posted April 29, 2008 That is normally the case. Two ways of fixing it. The hard and impractical method would be to setup a local dns server. The easier, and probably best solution would be to add an entry to your /etc/hosts file. 66.74.14.110 localhost If your using windows you'll need to search for a file called hosts and edit that. I'm not a windows user so I'm not sure where it exists, but I know it does. This is the file that everyone had to use to resolv host names to ip addresses before the wan got so big we needed dns. Link to comment https://forums.phpfreaks.com/topic/103357-php-socket/#findComment-529339 Share on other sites More sharing options...
dzedward Posted May 1, 2008 Author Share Posted May 1, 2008 I added that to my hosts file, and am now able to ping it with no loss. However, I'm still not able to bind or listen. Here are the errors unable to bind address [0]: The requested address is not valid in its context. unable to listen on socket [0]: An invalid argument was supplied. Link to comment https://forums.phpfreaks.com/topic/103357-php-socket/#findComment-530763 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.