Chicken-run Manager
Posts: 9
58 credits Members referred : 0
« on: Oct 18, 2006, 08:01:42 PM »
Hi,
I'm using the script for a while but after moving it to another server it doesn't work anymore... When I check it says it's registered and if I select 'show all info i got following message'
[Querying whois.dns.be][whois.dns.be: Temporary failure in name resolution][Unable to connect to remote host]
I'm running it on a Linux server (php5), I've filled in linux in the class, if I change it...it doesn't work...
It's not a DNS problem on the server because I can do a nslookup on the server...
Do you have any suggestions?
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6309
38674 credits Members referred : 374
I'm using the script for a while but after moving it to another server it doesn't work anymore... When I check it says it's registered and if I select 'show all info i got following message'
[Querying whois.dns.be][whois.dns.be: Temporary failure in name resolution][Unable to connect to remote host]
I'm running it on a Linux server (php5), I've filled in linux in the class, if I change it...it doesn't work...
It's not a DNS problem on the server because I can do a nslookup on the server...
Do you have any suggestions?
do you tried the "win" option (is using fsockopen in place of the command line)
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6309
38674 credits Members referred : 374
It's time to use PHP5!
« Reply #9 on: Oct 19, 2006, 11:01:27 PM »
nothing wrong with this server:
try this code an tell me what you get:
Code:
<?php
// Use this simple function to get the "free" information (like "Not found") // from a whois server. Read the (whois server) manual to learn which additional // paramaters are used.
function get_whois_data($test_server, $test_domain) { $msg = ""; $connection = fsockopen($test_server, 43, $errno, $errstr, 10); if (!$connection) { $msg = "Can't connect to the server!"; } else { sleep(2); fputs($connection, $test_domain."\r\n"); while (!feof($connection)) { $msg[] = fgets($connection, 4096); } fclose($connection); } return $msg; } print_r(get_whois_data("whois.nic.uk", "finalwebsites.co.uk")); // test an existing domain echo "<hr>"; //echo get_whois_data("whois.denic.de", "-T dn finalwebsites.de"); // test a non existing domain ?>
Chicken-run Manager
Posts: 9
58 credits Members referred : 0
« Reply #10 on: Oct 19, 2006, 11:15:34 PM »
Warning: fsockopen() [function.fsockopen]: unable to connect to whois.nic.uk:43 (Permission denied) in /var/www/vhosts/tomvandenberg.be/httpdocs/phpinfo.php on line 16 Can't connect to the server!
It has to be a problem with my webserver configuration...I have another server at the same location, using the same firewall,... (but a windows server) and there it's working...
Chicken-run Manager
Posts: 9
58 credits Members referred : 0
« Reply #12 on: Oct 19, 2006, 11:23:32 PM »
It's a problem with the security...i never worked with fedora before and while installing the server i've installed 'selinux'...it's providing better security??? maybe my problem is that selinux is blocking the connection...if that doesn't fix my problem...i'm going to use the other server
I will keep you informed
Chicken-run Manager
Posts: 9
58 credits Members referred : 0
« Reply #13 on: Oct 19, 2006, 11:59:10 PM »
I fixed it
If you google on "fsockopen and selinux" you'll see that it's a known problem...
When using Red Hat Fedora, beware of Security Enhanced Linux, SELinux.
Quoted from Red Hat: "The security goal is to make sure that Apache HTTP is only reading the static Web content, and not doing anything else such as writing to the content, connecting to database sockets, reading user home directories, etc."
Chicken-run Manager
Posts: 9
58 credits Members referred : 0
« Reply #15 on: Oct 20, 2006, 12:22:17 AM »
hehe i know but maybe other users could have the same problem so I just want to tell how I solved it...but i want to thank your your time (and the good script).
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6309
38674 credits Members referred : 374
hehe i know but maybe other users could have the same problem so I just want to tell how I solved it...but i want to thank your your time (and the good script).
right thanks for sharing the linux related information...