Re: [PHP] Re: fopen never ends?

2008-02-19 Thread Paul van Brouwershaven
The timeout is not the problem, the probleem is I'm not getting the ssl (like the peer cert) info into the stream_context_get_options Jim Lucas wrote: Paul van Brouwershaven wrote: Nathan Rixham wrote: I don't think this is a php problem, just load the url up in a browser and you'll see the s

Re: [PHP] Re: fopen never ends?

2008-02-19 Thread Jim Lucas
Paul van Brouwershaven wrote: Nathan Rixham wrote: I don't think this is a php problem, just load the url up in a browser and you'll see the same, appears to be a misconfigured server at the otherside - probably confused about not being passed a name based "host" header in the request. I know

Re: [PHP] Re: fopen never ends?

2008-02-19 Thread Richard Lynch
On Tue, February 19, 2008 5:49 pm, Chris wrote: > >>> Perhaps concider moving to fsockopen or stream_socket_client with >>> timeout parameters to solve your issue. >> >> fsockopen has no context > > Maybe I'm missing something but it returns a resource just like fopen. > > http://php.net/fsockopen

Re: [PHP] Re: fopen never ends?

2008-02-19 Thread Chris
Perhaps concider moving to fsockopen or stream_socket_client with timeout parameters to solve your issue. fsockopen has no context Maybe I'm missing something but it returns a resource just like fopen. http://php.net/fsockopen -- Postgresql & php tutorials http://www.designmagick.com/ --

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

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.

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

Re: [PHP] Re: fopen

2005-03-22 Thread Richard Lynch
On Mon, March 21, 2005 9:29 pm, John Taylor-Johnston said: >> > flock($results, 2); #lock file for writing >> > fwrite($results, $filestr); #write $filestr to $results >> > flock($results, 3); #unlock file >> > fclose($results); #close file >> This is an incorrect way to try to flock a file fo

Re: [PHP] Re: fopen

2005-03-21 Thread John Taylor-Johnston
Richard, thanks. > > chmod($defaultfile, 666); > http://php.net/chmod > has examples that tell you exactly why this is wrong... > The 666 you want is Octal. chmod($defaultfile, 0666); Check. Thanks. Didn't pay enough attention to that. > > What does the at_sign mean at the start of this line? >

Re: [PHP] Re: fopen

2005-03-21 Thread John Taylor-Johnston
Thanks for that! John Richard Lynch wrote: > On Sat, March 19, 2005 6:48 am, John Taylor-Johnston said: > > chmod($defaultfile, 666); > > http://php.net/chmod > > has examples that tell you exactly why this is wrong... > > 666 is decimal. > > The 666 you want is Octal. > > They ain't the same nu

Re: [PHP] Re: fopen

2005-03-21 Thread Richard Lynch
On Sat, March 19, 2005 6:48 am, John Taylor-Johnston said: > chmod($defaultfile, 666); http://php.net/chmod has examples that tell you exactly why this is wrong... 666 is decimal. The 666 you want is Octal. They ain't the same number. > What does the at_sign mean at the start of this lin

Re: [PHP] Re: fopen

2005-03-19 Thread John Taylor-Johnston
Hi, W+ does not work either. I have resorted to adding a blank, 0 byte text file. But it needs chmod 666. Interesting, I add this line: chmod($defaultfile, 666); and it send back an illegal error, but it appears to work anyway - the data is written! What does the at_sign mean at the start of t

Re: [PHP] Re: fopen

2005-03-18 Thread Christopher Evans
try $results = fopen($datafilename, "w+"); I am newbie at php so that may not work. -- --chris 1-916-501-1423 http://bbx.flnet.org/nxdos/";>http://bbx.flnet.org/nxdos/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: FOPEN

2005-02-19 Thread Rasmus Lerdorf
Al wrote: Diana Castillo wrote: How can I read the contents of a web page that uses basic authentication? I want to use fopen() but dont know how to do this and also send the username and password If the webpage is your script and it is going to check the authentication stuff, then simply us

Re: [PHP] Re: fopen/fgets

2003-03-07 Thread Bryan Koschmann - GKT
Thanks.. I feel stupid, I wasn't paying attention. *sigh* seems to work now :) Bryan On Fri, 7 Mar 2003, Adrian Ciutureanu wrote: |you close the input file in while loop ( fclose($fp); ) | |"Bryan Koschmann - Gkt" <[EMAIL PROTECTED]> wrote in message |news:[EMAIL PROTECTED] |> Can someon

Re: [PHP] Re: fopen, fread

2001-09-22 Thread Philip Olson
Yeah, filesize() does not work with urls. Suggested file() and implode() earlier for this task and didn't mention fgets() as it may be appropriate here as well. http://www.php.net/fgets http://www.php.net/file Both manual entries have examples that do exactly what you want, "Put a url conte

Re: [PHP] Re: fopen a URL with = in it

2001-08-05 Thread Corey Chapman
L PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Friday, August 03, 2001 10:19 PM > Subject: Re: [PHP] Re: fopen a URL with = in it > > > > So you're saying that I should be able to pass the = sign in just fine > > into the fopen call with no errors? I understan

Re: [PHP] Re: fopen a URL with = in it

2001-08-03 Thread Corey Chapman
So you're saying that I should be able to pass the = sign in just fine into the fopen call with no errors? I understand what you mean that if = was what the variable was defined as, then THAT is where I'd use urlencode ;) I wasn't too sure about that, but now I am. Quite odd that it reports er