Re: [PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-30 Thread Richard Lynch
DNS records are failing to lookup the domain name for you... Maybe just put the URL back into a queue to try later. You should also toy with nslookup or dig from the command line and see if you can get it to fail as often. On Thu, December 27, 2007 12:00 pm, Albert Wiersch wrote: Some

Re: [PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-30 Thread Richard Lynch
If it's a busy server, you may be running out of TCP connections... If PHP can't open ANY connection at all, it can't do a DNS lookup, and it would fail very fast, as it's hitting an OS limit/cap on the number of connections and not even getting to try to talk to the Internet. On Fri, December

[PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-29 Thread Albert Wiersch
Dan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] You really need to filter your input more, have a list of what is acceptable not what is unacceptable. That being, make it a requirement that the url input has a TDL(.com, .net, .org, etc.) or is a valid IP(ping it), only

[PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-28 Thread Albert Wiersch
I'm now using PHP 5.2.5. Well, it seems to still be happening. This describes the problem but I haven't found a solution that works for me yet: http://bugs.php.net/bug.php?id=11058 Is it a PHP problem or DNS? It works sometimes but not other times.. something strange is going on. Example

Re: [PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-28 Thread Wolf
DNS issues Albert Wiersch wrote: I'm now using PHP 5.2.5. Well, it seems to still be happening. This describes the problem but I haven't found a solution that works for me yet: http://bugs.php.net/bug.php?id=11058 Is it a PHP problem or DNS? It works sometimes but not other times..

Re: [PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-28 Thread Albert Wiersch
Wolf [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] DNS issues I think I've solved this. I found a problem with resolv.conf that contained some outdated DNS servers. After changing that and rebooting the server it seems to be working. It didn't seem to work after just changing the

[PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-28 Thread Dan
Albert Wiersch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I noticed my script at http://onlinewebcheck.com was sometimes (fairly often) failing to open some URLs that users have entered. fopen() returns false very quickly, but when tried again with the same URL, sometimes it

[PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-27 Thread Albert Wiersch
Some additional info. It seems I am getting these warnings when it fails: Warning: fopen() [function.fopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known Warning: fopen(http://wanganda2u.co.uk) [function.fopen]: failed to open stream: Now I have to find out why

Re: [PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-27 Thread Daniel Brown
On Dec 27, 2007 1:00 PM, Albert Wiersch [EMAIL PROTECTED] wrote: Some additional info. It seems I am getting these warnings when it fails: Warning: fopen() [function.fopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known That sounds like a DNS resolution error.

Re: [PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-27 Thread Albert Wiersch
Daniel Brown [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] That sounds like a DNS resolution error. If you have Telnet/SSH or local console access, try doing a dig, traceroute, and ping series on it. Hi Daniel, Yes, I have SSH access. I will keep that in mind. Upgrading to

Re: [PHP] Re: fopen() for http:// sometimes working, sometimes not

2007-12-27 Thread Albert Wiersch
Albert Wiersch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Yes, I have SSH access. I will keep that in mind. Upgrading to 5.2.5 may have addressed this issue though. If not, then I'll concentrate on a possible DNS resolution problem. Well, it seems to still be happening.

[PHP] Re: fopen for http://

2005-05-27 Thread Peter Brodersen
On Fri, 27 May 2005 13:57:12 -0500, in php.general [EMAIL PROTECTED] (Jay Paulson) wrote: For example, in my Apache httpd.conf file I have it set up to where I have a directory that is only accessible from certain IP addresses, one of which is 127. (the localhost). The script I'm running is