Fedora Linux Support Community & Resources Center

Sections ›› Home | Forums | Guidelines | Forum Help | Fedora FAQ | Fedora News 

Go Back   FedoraForum.org > Fedora Support > Servers

Servers The place to discuss any Fedora server problems you may have.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 2005-01-26, 05:57 AM CST
RawFoX Offline
Registered User
 
Join Date: Jan 2005
Posts: 8
Question Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed:


Hello ppl, i need help here !
This is not my first try to solve this and i am not really a linux newbie, but this rapes my mind....

I got problems with FC1 on a server with static IP in a datacenter. Its a normal LAMP Webserver what runs since release of FC1 without any Problems. There are some virtual hosts with mainly PHP-coded pages on it. Some CMSs like PHPNuke, OSCommerce or XT-Commerce and some other webrelated staff. Some CMSs give u possibility, to include RSS-feeds, to mail the customers or users a password and so on. The Server uses currently my Providers DNS, but i have had the same problems with other DNSs, including my own named on the server.

1. fsockopen() cannot open external Files for usage i.e. with fopen()
2. PHP cannot mail out with sendmail -t -i

I thing, both problems got the one and same issue, so i am on the fsockopen() problem first.
I got this test, to checkout the fsockopen() function:
-
<?
$host = "www.hg-carstyling.de";
$fp = fsockopen ($host, 80, $errno, $errstr, 30);
echo "<b>Socket Test with $host </b><br>";
if (!$fp)
{
echo "FEHLER!:";
echo "$errstr ($errno)<br>\n";
} else
{
echo "PASSED!:<br>";
fputs ($fp, "GET / HTTP/1.0\r\n\r\n");
while (!feof($fp))
{
echo fgets($fp,128);
}
fclose($fp);
}
?>
-
This test fails , but if i enter the requestet site in /etc/hosts, the test passes fine !
So u will say, its a DNS-Problem - ok, i thing so too.
So i talk to my (absolut linux competent) provider about this. He saw no problems, so i like to ask you here, what can be happened on a DNS, that such an error occurs ?

The Server itself got no probs, to resolve the remote location:
-
[root@isti542 root]# host www.hg-carstyling.de
www.hg-carstyling.de has address 212.227.109.212
-
The Server can resolv its IP and reverse its name:
-
[root@isti542 root]# host isti542.fasthousing.de
isti542.fasthousing.de has address 62.141.41.94
[root@isti542 root]# host 62.141.41.94
94.41.141.62.in-addr.arpa domain name pointer isti542.fasthousing.de.
-
Sendmail can send mail from bash with no problems, but PHP cannot ?!?
Mails send via PHP mail() going to nirvana - as they had never be written, no logentry, no maillog, no message, nothing ...
Server can resolve all that ****, but PHP cannot ??!
While got some RSS-Staff on the site, i got tons of:
-
Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/rawfox/public_html/modules/Your_Account/index.php on line 427
Warning: fsockopen(): unable to connect to linuxcentral.com:80 in /home/rawfox/public_html/modules/Your_Account/index.php on line 427
-
on all sites on the server. If entered in /etc/hosts, all went fine and sure i can do a
-
[root@isti542 root]# ping linuxcentral.com
PING linuxcentral.com (69.3.255.70) 56(84) bytes of data.
64 bytes from lucy.linuxcentral.com (69.3.255.70): icmp_seq=0 ttl=54 time=135 ms
64 bytes from lucy.linuxcentral.com (69.3.255.70): icmp_seq=1 ttl=54 time=137 ms
64 bytes from lucy.linuxcentral.com (69.3.255.70): icmp_seq=2 ttl=54 time=138 ms
-
NSLookup is fine, too:
-
[root@isti542 root]# nslookup linuxcentral.com
Server: 62.141.40.11
Address: 62.141.40.11#53

Non-authoritative answer:
Name: linuxcentral.com
Address: 69.3.255.70

[root@isti542 root]# nslookup isti542.fasthousing.de
Server: 62.141.40.11
Address: 62.141.40.11#53

Non-authoritative answer:
Name: isti542.fasthousing.de
Address: 62.141.41.94
-
It seems, that PHP is not able to use the DNS and it needs the /etc/hosts to resolve Names ?!!?
Without /etc/hosts, PHP is not able to do a fsockopen() and i am sure, if i enter the relatet mailservers in /etc/hosts, PHP will mails out, but thats not testet.
-
php_network_getaddresses: getaddrinfo failed: Name or service not known
-
The Service is unknown for PHP, but not for the rest of the server - i´m totally confused
OK, maybe i found some help here on this topic.
regards

Michael

Last edited by RawFoX; 2005-01-26 at 06:02 AM CST.
Reply With Quote
  #2  
Old 2007-06-15, 12:03 PM CDT
jvanv8 Offline
Registered User
 
Join Date: Sep 2006
Posts: 6
I have the same problem... any ideas how to fix it??
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ata2 : SRST failed and SELinux Warning BonniesTUX General Support 0 2009-06-23 10:33 PM CDT
preloader: Warning: failed to reserve range 00000000-00010000 fcastelo Fedora Focus 1 2009-02-17 11:35 AM CST
getaddrinfo performance issue with multiple IPs srm2400 Networking 0 2008-01-16 01:13 PM CST
** WARNING **: alsa_get_mixer(): Attaching to mixer hw:0 failed: Permission denied fedora1984 General Support 0 2005-04-09 11:12 AM CDT
Warning: fsockopen(): php_network_getaddresses: getaddrinfo M.Clasen gmane.linux.redhat.fedora.general 2 2005-02-02 04:47 PM CST

Automatic Translations (Powered by Powered by Google):
Afrikaans Albanian Arabic Belarusian Bulgarian Catalan Chinese Croatian Czech Danish Dutch English Estonian Filipino Finnish French Galician German Greek Hebrew Hindi Hungarian Icelandic Indonesian Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Taiwanese Thai Turkish Ukrainian Vietnamese Yiddish

All times are GMT -7. The time now is 12:46 PM CST.

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo



All trademarks, and forum posts in this site are property of their respective owner(s).

FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact | Founding Members
Designed By Ewdison Then | Powered by vBulletin ©2000-2009, Jelsoft Enterprises Ltd.
FedoraForum is Powered by Open Source Projects and Products
Translated to other languages thanks to NLP-er 2.3.8