Chicken-run Manager
Posts: 9
58 credits Members referred : 0
« on: Oct 18, 2006, 07: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: 6691
34714 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)
Chicken-run Manager
Posts: 9
58 credits Members referred : 0
« Reply #2 on: Oct 18, 2006, 10:09:36 pm »
yes i tried it...but that doesn't work
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #3 on: Oct 18, 2006, 10:19:26 pm »
try a simple fsockopen command from the php manual and tell me if this is working...
Chicken-run Manager
Posts: 9
58 credits Members referred : 0
« Reply #4 on: Oct 19, 2006, 07:35:10 pm »
a simple psockopen didn't work so it's a problem with my server...but i don't know what to do to fix it :p wish me good luck lol
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #9 on: Oct 19, 2006, 10: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, 10: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...
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #11 on: Oct 19, 2006, 10:18:51 pm »
you have to choices use a regular server
or you have to wait until I have the time to write a cURL version for this class (need to work for customers first)
Chicken-run Manager
Posts: 9
58 credits Members referred : 0
« Reply #12 on: Oct 19, 2006, 10: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, 10: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."
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #14 on: Oct 19, 2006, 11:15:31 pm »
cypres,
I'm a web developer not server admin
Chicken-run Manager
Posts: 9
58 credits Members referred : 0
« Reply #15 on: Oct 19, 2006, 11:22:17 pm »
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: 6691
34714 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...
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=4484