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
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
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
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/
--
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 that my browser is also waiting
Paul van Brouwershaven wrote:
When you run the folling script, it will never ends?
I have seen this more then once, I know that there is no service running
at the target host, but why is the script not printing the failed message?
It's only with a few ip-number I have this problem.
if ($fp =
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
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
""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)
""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
"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
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.
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
""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
""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
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
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
Did you read this?
http://br.php.net/manual/en/function.fopen.php
""Christian Calloway"" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> Hello all,
>
> this seems like an easy question, but I could sure as hell couldn't find
> any responces to it through initial searched. I am
(SOLVED, see below)
"Dan Baker" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Chris" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Dan Baker wrote:
>>> I have the following code snippet:
>>> $h = fopen("$path/file.txt", 'x+');
>>>
>>> And it generates the foll
"Chris" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Dan Baker wrote:
>> I have the following code snippet:
>> $h = fopen("$path/file.txt", 'x+');
>>
>> And it generates the following error:
>> Warning: fopen(/home/./myarea/file.txt): failed to open stream:
>> Permission deni
Hi,
yes, there could be some problem with your code. But it depends on what
are you trying to archieve.
If you are trying to put whole file to database, there is no reason to
use fgets function. Just use $buffer=file_get_contents($filename); and
put the buffer into SQL. No reason to read it
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
AJ Lemke wrote:
> Hello all,
>
> I have an install of php on a Red Hat Ent. server that is giving me fits.
> I have been trying to use the fopen command to retreive files from external
> sites and have been getting this error:
>
> Warning: fopen(http://us3.php.net/images/php.gif): failed to open st
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
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?
>
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
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
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
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
I could use:
or die($php_errormsg);
but it is turned off in my php.ini and I can't modify it myself.
John
> FOpen question. My script is dying. "Our results file could not be opened for
> writing"
>
> What can I add to get more info from the die?
>
> $defaultfile = "ffmail.txt"; #default file
P.S., I've checked the doc and tried "a+". It still does not create ffmail.txt.
@ $results = fopen($datafilename, "a+");
# Open for reading and writing; place the file pointer at the end of the file.
#If the file does not exist, attempt to create it
It does not create it.
John
> FOpen question
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
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 use GET argu
Admin wrote:
Here is the code I am using:
$fileHandle = fopen($fileUpload, "r");
$fileContent = fread($fileHandle, $fileUpload_size);
$fileContent = addslashes($fileContent);
Warning: fopen("C:\\0-temp\\100_0078.jpg", "r") -No such file or
directory in /var/www/testbed/httpdocs/blob/grabfile.p
I tried, but I receive the new error:
Warning: fopen(): php_network_getaddresses: getaddrinfo failed: Name or
service not known in /home/manageme/public_html/try-test/fopen-test-http.php
on line 7
Warning: fopen(http://www.management.kiev.ua/MO/main.php/): failed to open
stream: Permission denie
"Taras Panchenko" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have 2 questions:
> 1) why gethostbyname() does not resolve my host name into IP?
> 2) why fopen() (and file()) does not open an external (URL) file via http?
> Please, see my example below:
> --
>
ht
Mike D wrote:
I am trying to read in a particular page to a variable. How do you handle if
the page is a 404 and then redirects to a custom error page? Am I supposed
to use fsockopen and read headers or ?? Ideally I need to pull the
end-result page to search for a string in it.
Here's the code
$ha
Hi
If i'm reading your code in the right way, i think
you can better use the file_exists function available
in php
Read the manual at:
http://www.php.net/manual/nl/function.file-exists.php
Many success
Coert Metz
Sebastian wrote:
hello,
i have this snippet of code, from what i can tell it works
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
you close the input file in while loop ( fclose($fp); )
"Bryan Koschmann - Gkt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Can someone give me a hand here? I am really lost as to what is
going on.
> I have a file that looks like this
>
> user1,Store 1 - ABC street
> user2,Store
Mat>To get data out of the file that you
Mat>have opened, you will need to read() it n.
Mat>http://www.php.net/manual/en/function.fread.php
Ok, how about this? What about error checking if the file contains something as I
include below? Is that enough?
$contents";}
else{echo "no contents there";
the @ before the fopen just tells php to suppress the error message if it
can't open the file.
that's all it does.
"John Taylor-Johnston" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> #http://www.php.net/manual/en/function.fopen.php
>
> $contents = fopen ("/home/pathto/file.txt", "
To see the error in action go to http://www.moorhouse.co.za/test.php
Please help!
Thanks
"Elna Moorhouse" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
What I want to do is very simple, I have a txt file on a ftp server, that contains
the number of visit
Yup!
On Thu, 19 Sep 2002 16:43:48 -0700, Donahue Ben wrote:
> I have a php script that tries to write files in a
> particular directory. When the script writes files
> the ownership is "apache". The problem I have is the
> particular directory that the script is trying to
> create files in, it
Hi,
You should use a while(!feof) syntax so that can verify that the file is
not empty.
You should also use
$text = implode("",@file($filename));
Thats the easiest way to read a file. It will put each lines into an
array and you will just implode it into a variable
--
Merci de nous avoi
Why don't you try chmoding the file 777.
Next use readfile:
http://www.php.net/manual/en/function.readfile.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
checkout:
opendir()
readdir()
fstat()
closedir()
Elias
"Electroteque" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi there i was wondering how i could fopen a directory and then sort the
> files by date modified is there a way ?
>
>
--
PHP General Mail
>I am trying to do a simple fopen("http://www.weather.com/index.html";, "r");
>For some reason I cannot Open any URL's after trying several.
>
>I get the following error
>
>Warning: stat failed for Resource id #1 (errno=2 - No such file or
>directory)
It's possible that weather.com is sending c
Brian Tully wrote:
> i've been going crazy trying to figure out how to add news items to the
> top of an already existing txt file containng previous news posts. While
> I'd love to change the system so everything is database-driven (as most of
> the rest of the site is), this news area has so mu
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Scott) wrote:
> I am attempting to transfer files from one server to another via ftp. I
> am wondering if this is the best method to transfer files within PHP or
> should I seek other methods. Here is the way I am doing it now:
>
> $sendfile
If you are worried about this, you should probably use a database which will
take care of this for you...
It is possible to use http://php.net/flock to lock the file, pretty much
like the example in the manual, and then 4999 users will have to wait until
the one editor is finished...
You'll stil
I read the manual but i still don't know how to use flock do you have an
exemple?
flock works on windows2000 ?
Martin <[EMAIL PROTECTED]> escreveu nas notícias de
mensagem:[EMAIL PROTECTED]
> Kmarada schrieb:
>
> > is it possible to use fopen to open 5000 files differents simultaneous
and
> > edi
Kmarada schrieb:
> is it possible to use fopen to open 5000 files differents simultaneous and
> edit it simultaneous ?
I think, this depends how many files your operating-system can handle.
> i have one file. if four user edit it simultaneous what happen? there is
> something to lock the file u
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
I tried to get it via CURL but i failed, here's the output:
* Connected to www.800.com (216.88.211.1)
> GET /prod.asp?P=5261 HTTP/1.1
User-Agent: curl/7.8 (win32) libcurl 7.8
Host: www.800.com
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
* Closing live connecti
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
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
for the first part, make sure that you have write permission to the
directory specified, and for the second, you can't open a file for writing
from a remote location.
Keith Jeffery
[EMAIL PROTECTED]
"Ibrahim Noor" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Their CGI *MIGHT* be checking all sorts of things and determining that you
are not a real browser and denying access...
--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little
59 matches
Mail list logo