Page is a not externally linkable
incrediBILL - 5:05 pm on Jan 28, 2013 (gmt 0)
[edited by: incrediBILL at 11:56 pm (utc) on Jan 28, 2013]
Got a weird problem where PHP's fsockopen won't open a socket to Whois on port 43 on one server. It'll open some other ports just fine, but not port 43. This code works just fine on my other servers, just not this one installation.
Port 43 isn't in a firewall, command line WHOIS works just fine, and I can use CURL to open a socket to port 43 such as "curl whois.arin.net:43" which gets a response from their server.
I've checked everywhere to see if anyone else had this specific problem with PHP and WHOIS ports not working in PHP and sure enough, the question is posted in many places, just no answer as to why is happens or how to fix it.
I found one thread on another forum where they were approaching a solution but the genius mods shut down the thread for not being of interest to the internet. Yeah, unknown socket failure on just port 43 like it's being firewalled for unknown reason with people posting around and never getting answers, too tough a question so close the thread ;)
Thought maybe the PHP wizard of WebmasterWorld had possibly run across such an annoying anomaly and found a resolution but I'm also aware I do some stuff off the beaten path so others may have never encountered this problem.
My last idea is to reload the server from scratch and see if that solves the problem but since others are having the same situation it means I may encounter it elsewhere and nobody would have a clue until tried because the odds of anyone directly accessing the WHOIS port in their PHP code is kinda small.
Obviously I can use curl and that works but why not fsockopen?
The only idea I had was maybe arin.net is blocking a raw socket connection to that server for whatever reason but it seems unlikely and my other servers with the same basic configuration on the same host running the same code all work fine.
Crossing fingers, anyone? suggestions? I'm stumped.