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 28

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 additi

[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)

[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

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

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.

[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 m

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 happe

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. Upgr

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 er

[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 that