With RHEL/CentOS 5 php I get an SSL Error
RHEL/CentOS 5 php is at 5.1.6 with security fixes backported.
?php
$handle = fopen(https://maps.google.com;, r);
$contents = stream_get_contents($handle);
fclose($handle);
?
will result in something like
Warning: stream_get_contents(): SSL: fatal
I believe this was a bug, is only a warning that may be suppressed and may
have been fixed in 5.2.0. Are you aware that PHP is at 5.5.4 and that
5.1.6 is over 7 years old?
-Shawn
On Wed, Sep 25, 2013 at 9:09 AM, Markus Falb markus.f...@fasel.at wrote:
With RHEL/CentOS 5 php I get an SSL
Just as I thought:
5.2.0
Fixed bug #39039 SSL: fatal protocol error when fetching HTTPS from servers
running Google web server). (Ilia)
On Wed, Sep 25, 2013 at 10:03 AM, Shawn McKenzie
shawn.mcken...@gmail.comwrote:
I believe this was a bug, is only a warning that may be suppressed and may
On 25.9.2013 17:12, Shawn McKenzie wrote:
Just as I thought:
5.2.0
Fixed bug #39039 SSL: fatal protocol error when fetching HTTPS from servers
running Google web server). (Ilia)
Thanks, but ...
I am not sure how what I am supposed to do with this information.
#39039 says it is a bug and it
On 25.9.2013 17:03, Shawn McKenzie wrote:
I believe this was a bug, is only a warning that may be suppressed and may
have been fixed in 5.2.0. Are you aware that PHP is at 5.5.4 and that
5.1.6 is over 7 years old?
Please understand that some Distributions do the only backport security
stuff
I thought I covered that. The bug was fixed 7 years ago. Upgrade PHP, I
doubt there is a patch. I understand that not all coders or distributions
will have the latest version of PHP, but come on, how many thousands of
bugs have been fixed in 7 years? You're going to run into more.
Adam Tong adam.to...@gmail.com hat am 11. Februar 2013 um 16:11 geschrieben:
I think this is what happened. As the application was trying to open
our url domain the request was sent to the load balancer, and as it
does not accept internal requests, the connection was timed out.
The only way
Adam Tong adam.to...@gmail.com hat am 10. Februar 2013 um 23:41 geschrieben:
Hi,
We had an issue with the code of a junior php developer that used
fopen to load images using the url of the companies website that is
load balanced.
We could not the detect the problem in dev and test because
I think this is what happened. As the application was trying to open
our url domain the request was sent to the load balancer, and as it
does not accept internal requests, the connection was timed out.
The only way we could avoid that is to not use fopen our url, is that right?
On Mon, Feb 11,
On Mon, Feb 11, 2013 at 10:11 AM, Adam Tong adam.to...@gmail.com wrote:
On Mon, Feb 11, 2013 at 4:26 AM, ma...@behnke.biz ma...@behnke.biz
wrote:
Adam Tong adam.to...@gmail.com hat am 10. Februar 2013 um 23:41
geschrieben:
Hi,
We had an issue with the code of a junior php developer
Hi,
We had an issue with the code of a junior php developer that used
fopen to load images using the url of the companies website that is
load balanced.
We could not the detect the problem in dev and test because the dev
and test servers are not load balanced.
I know that he could load the
On Sun, Feb 10, 2013 at 5:41 PM, Adam Tong adam.to...@gmail.com wrote:
Hi,
We had an issue with the code of a junior php developer that used
fopen to load images using the url of the companies website that is
load balanced.
We could not the detect the problem in dev and test because the
Hi, wht dont you try it with IP, ex:
fopen('http://11.12.13.14/sharename/folder/file.xml', 'w');
Date: Mon, 15 Jun 2009 22:51:09 -0400
From: aball...@gmail.com
To: nos...@mckenzies.net
CC: php-general@lists.php.net
Subject: Re: [PHP] fopen() on a network share?
On Mon, Jun 15, 2009 at 7
Running on Windows... I have a network share, \\sharename\foldername,
and I want to write a file. How do I format the pathname with fopen()
for this?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Extra info, in case needed: my code says
fopen('\\servername\sharename\folder\file.xml', 'w');
and it returns Failed to open stream, no such file or directory.
I've verified that the PHP machine does have unrestricted permissions
to that share and to the directory. Thanks.
On Jun 15,
Brian Dunning wrote:
Extra info, in case needed: my code says
fopen('\\servername\sharename\folder\file.xml', 'w');
and it returns Failed to open stream, no such file or directory. I've
verified that the PHP machine does have unrestricted permissions to that
share and to the directory.
On Mon, Jun 15, 2009 at 7:24 PM, Shawn McKenzienos...@mckenzies.net wrote:
Brian Dunning wrote:
Extra info, in case needed: my code says
fopen('\\servername\sharename\folder\file.xml', 'w');
and it returns Failed to open stream, no such file or directory. I've
verified that the PHP machine
On Tue, Nov 11, 2008 at 9:10 AM, Yeti [EMAIL PROTECTED] wrote:
As PHP says ... there seems to be something wrong with file
permissions. Make sure the IIS-user (if there is one on windows) can
read intekendb.php.
I don't know if you checked [1] yet. It's alot of useful info about php on
IIS.
Hi
I have this problem for 6 months now and still no answer that solve the
problem
With the php I retrieve the information viewers enter in form field on a
previous page after the submit. php then should take that info and proces it
into a single line. After it is processed it should be
As PHP says ... there seems to be something wrong with file
permissions. Make sure the IIS-user (if there is one on windows) can
read intekendb.php.
I don't know if you checked [1] yet. It's alot of useful info about php on IIS.
Quote out of that article:
The IIS user (usually IUSR_MACHINENAME)
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 = fopen('https://81.23.227.9',
On Dec 27, 2007 11:31 AM, Albert Wiersch [EMAIL PROTECTED] wrote:
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
works.
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
works. What would cause this behavior? Why does fopen() occasionally fail to
Daniel Brown [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Dec 27, 2007 11:31 AM, Albert Wiersch [EMAIL PROTECTED]
wrote:
Are the URLs being passed to fopen() properly escaped? Are they
valid, complete with http:// placed before the domain? Try keeping a
log of all
On Dec 27, 2007 12:57 PM, Albert Wiersch [EMAIL PROTECTED] wrote:
What needs to be escaped for a URL anyway? I am just changing spaces to
'%20' now.
Arbitrary code can still be injected unless it's properly
sanitized, but that's beyond the scope here.
Mainly, make sure quotes (single
Hi.
I want to know, what charset is applied to every file when is created with
the fopen function and how can I to manage the charset when I use the fopen
function?
For example: If i want to create an ISO-8859-2 file, how can I to force, the
fopen function to create it?
Regards
--
Mauricio
[snip]
I want to know, what charset is applied to every file when is created
with
the fopen function and how can I to manage the charset when I use the
fopen
function?
For example: If i want to create an ISO-8859-2 file, how can I to force,
the
fopen function to create it?
[/snip]
This may start
I'm collecting data from a form and using it to write to a flat file
like so:
Quote:
//this removes line breaks in an text field box and substitutes
double breaks
$postbody = str_replace(\r\n, br/br/,$postbody);
$thepost = $postitle | $postdate | $postbody | $author \r\n;
if ($posttype==add)
# [EMAIL PROTECTED] / 2007-01-13 17:32:00 -0500:
I can write to the bottom of the file, no problem, but if I want to
put new entries at the top of the file I have problems:
the previous entry is partially overwritten and mangled..
you cannot prepend to a file. to do that you need to create
mike xu wrote:
Thanks a lot forr your reply.
Here is the error msg:
*Warning*: fopen(/dev/pmsg)
[function.fopenhttp://localhost/Source/test/function.fopen]:
failed to open stream: Permission denied in *
/var/www/html/Source/test/register_user.php* on line *31
It still doesn't work even if I
Hi Ryan,
I just did another test, if I start the httpd by root user manually (the
httpd daemon program still owns apache user by the result of `ps -aux`), the
php script works fine. So, it seems the httpd start script
(/etc/rc.d/init.d/httpd) did something specially which cause the permission
Its so strange, when I runing /etc/rc.d/rc3.d/S85httpd restart, the php
script couldn't fopen pipe file.
But if I copy /etc/rc.d/rc3.d/S85httpd to some other place (for example
/root), and execute `/root/S85httpd restart`, the php script could fopen
file successfully!
Its so confusing ...
On
Hi, I have problem of open named pipe file in linux.
Here is my sample code:
$fifo_file = /dev/pmsg;
@ $fp = fopen($fifo_file, 'w+b');
if(!$fp) {
echo open .$fifo_file. failed;
}
else {
$msg_cmd = ttt;
fwrite($fp, $msg_cmd, strlen($msg_cmd));
fclose($fp);
}
There is an
mike xu wrote:
Hi, I have problem of open named pipe file in linux.
Here is my sample code:
$fifo_file = /dev/pmsg;
@ $fp = fopen($fifo_file, 'w+b');
It's wb+ not w+b
--
Postgresql php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To
mike xu wrote:
Hi, I have problem of open named pipe file in linux.
Here is my sample code:
$fifo_file = /dev/pmsg;
@ $fp = fopen($fifo_file, 'w+b');
if(!$fp) {
echo open .$fifo_file. failed;
}
else {
$msg_cmd = ttt;
fwrite($fp, $msg_cmd, strlen($msg_cmd));
fclose($fp);
Thanks a lot forr your reply.
Here is the error msg:
*Warning*: fopen(/dev/pmsg)
[function.fopenhttp://localhost/Source/test/function.fopen]:
failed to open stream: Permission denied in *
/var/www/html/Source/test/register_user.php* on line *31
It still doesn't work even if I move pmsg to /tmp/
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 running php on an XP system
and I need to open a file contained with a set of directories which may or
may not have a space character; so for example:
fopen
On Fri, 2006-07-28 at 16:55, Christian Calloway wrote:
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 running php on an XP system
and I need to open a file contained with a set of directories which may
On Fri, 2006-07-28 at 17:27, Robert Cummings wrote:
On Fri, 2006-07-28 at 16:55, Christian Calloway wrote:
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 running php on an XP system
and I need
Christian Calloway wrote:
this seems like an easy question, but I could sure as hell couldn't find any
responces to it through initial searched. I am running php on an XP system
and I need to open a file contained with a set of directories which may or
may not have a space character; so for
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 denied
The path is correct, but the php process doesn't seem to have file
permissions in the folder.
Is
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 denied
The path is correct, but the php process doesn't seem to have file
permissions in
Hello there,
I Have a problem with some file writeing.
I Use fopen to create a new file, but that file gets the owner and group
the same as the apache owner and group.
How can i change it so that the file gets the same owner/group as the
files i upload with FTP?
Thx in advanced
--
PHP
Mathijs wrote:
Hello there,
I Have a problem with some file writeing.
I Use fopen to create a new file, but that file gets the owner and group
the same as the apache owner and group.
How can i change it so that the file gets the same owner/group as the
files i upload with FTP?
Thx
On 11 November 2005 20:52, Jay Blanchard wrote:
$theFile = fopen(docs/InstallationInstructionMaster.txt, r) ||
die;
You need or not || here. The operator priorities are such that the above
means
$theFile = (fopen(docs/InstallationInstructionMaster.txt, r) || die);
which assigns TRUE to
On 11 November 2005 21:21, Nathan Tobik wrote:
I've always used:
fopen(C:\\dir\\dir\\file.txt);
on windows, I'm not sure how PHP interprets the slashes internally
though...
On Windows, / in filenames is internally translated by PHP to \ -- which
means you can write code that works on
[snip]
You need or not || here. The operator priorities are such that the above
means
...
which assigns the result of fopen() to $theFile, and then executes die if
it's false -- which is much more satisfactory. ;)
[/snip]
Originally I did not have any '||' or 'or' in the conditional check, with
On Fri, November 11, 2005 2:51 pm, Jay Blanchard wrote:
$theFile = fopen(docs/InstallationInstructionMaster.txt, r) ||
die;
Don't use || when you mean 'or' :-)
Nor sure it really matters here, but better to follow the crowd and
use 'or' here.
while(!feof($theFile)){
$theLine =
On Fri, November 11, 2005 3:23 pm, Jay Blanchard wrote:
// Left off the b because it ain't binary :)
I think you will find this is the crucial difference if you go back to
your original and take it out.
Your file is text.
It's not binary.
On Windowz, that matters, for some odd reason.
--
[snip]
On Fri, November 11, 2005 2:51 pm, Jay Blanchard wrote:
$theFile = fopen(docs/InstallationInstructionMaster.txt, r) ||
die;
Don't use || when you mean 'or' :-)
Nor sure it really matters here, but better to follow the crowd and
use 'or' here.
[/snip]
Okie dokie. Found there to be no
$theFile = fopen(docs/InstallationInstructionMaster.txt, r) || die;
while(!feof($theFile)){
$theLine = fgets($theFile, 4096);
echo $theLine . br\n;
}
fclose($theFile);
The above code appears to work, but all that is output is lines of line
breaksno data. The file is a tab
Jay Blanchard wrote:
$theFile = fopen(docs/InstallationInstructionMaster.txt, r) || die;
I'm not sure if it would make any difference, but I usually use or in
this case rather than ||, and I know they have different operator
precedence.
while(!feof($theFile)){
$theLine =
[snip]
Well, it's a pretty model example of a line-by-line file read. I can't
see anything wrong with it, so perhaps the problem lies elsewhere.
There's no other files with the same name in your include_path?
Maybe something to do with auto_detect_line_endings or whatever it's
called, in
Jay Blanchard wrote:
[snip]
Well, it's a pretty model example of a line-by-line file read. I can't
see anything wrong with it, so perhaps the problem lies elsewhere.
There's no other files with the same name in your include_path?
Maybe something to do with auto_detect_line_endings or
I've always used:
fopen(C:\\dir\\dir\\file.txt);
on windows, I'm not sure how PHP interprets the slashes internally
though...
Nate Tobik
(412)661-5700 x206
VigilantMinds
$theFile = fopen(docs/InstallationInstructionMaster.txt, rb) ||
die;
--
PHP General Mailing List (http://www.php.net/)
[snip]
Blank lines. Just to see if the problem is fgets(), try this:
// Left off the b because it ain't binary :)
$theFile = file_get_contents( docs/InstallationInstructionMaster.txt,
r ) or die;
$lines = explode( \n, $theFile );
foreach( $lines as $line ) {
$line = explode( \t, $line
John Taylor-Johnston wrote:
It does what I want, but I worry 4096 may not be big enough. Possible?
4096 is the number of bytes fgets() will get, but the fgets()
call is inside a while loop which keeps running until the 'filepointer'
(as denoted by the handle $dataFile) in question has reached
if all you want to do is read the entire file try
$contents = file_get_contents($filename);
On Tuesday 25 October 2005 11:54 pm, John Taylor-Johnston wrote:
It does what I want, but I worry 4096 may not be big enough. Possible?
Is there a way to detect the filesize and insert a value for 4096?
On Oct 26, 2005, at 12:54 AM, John Taylor-Johnston wrote:
It does what I want, but I worry 4096 may not be big enough.
Possible? Is there a way to detect the filesize and insert a value
for 4096?
$buffer = fgets($dataFile, $filesize);
Is this what it is for?
John
?php
It does what I want, but I worry 4096 may not be big enough. Possible?
Is there a way to detect the filesize and insert a value for 4096?
$buffer = fgets($dataFile, $filesize);
Is this what it is for?
John
?php
#http://ca3.php.net/fopen
$filename = /var/www/html2/assets/about.htm ;
$dataFile =
Are you using the a or a+ modes on fopen, because I have a sneaky feeling the
file doesn't exist.
-Original Message-
From: Ross [mailto:[EMAIL PROTECTED]
Sent: 24 June 2005 00:33
To: php-general@lists.php.net
Subject: [PHP] fopen problem
*
This e
I have a bit of a problem when using fopen, fwrite and fclose locally I get
the flowing warnings
Warning: fopen(counterlog.txt) [function.fopen]: failed to open stream:
Permission denied in c:\Inetpub\wwwroot\pillars\index.php on line 30
Warning: fwrite(): supplied argument is not a valid
can you show the code? did you chmod the files?
On Thu, June 23, 2005 4:33 pm, Ross said:
Warning: fopen(counterlog.txt) [function.fopen]: failed to open stream:
Permission denied in c:\Inetpub\wwwroot\pillars\index.php on line 30
The PHP user does *NOT* have permission to open the counterlog.txt file.
Exactly *HOW* you change permissions
Hello all-
I was wondering if anyone knew of a way to call a web site using fopen.
Let me tell you how things are set up and what I'm trying to do. I
can call fopen to read a site and then echo it back out. That's not a
problem. The problem I run into is when I try to go to a restricted
On 5/27/05, Jay Paulson [EMAIL PROTECTED] wrote:
Hello all-
I was wondering if anyone knew of a way to call a web site using fopen.
Let me tell you how things are set up and what I'm trying to do. I
can call fopen to read a site and then echo it back out. That's not a
problem. The
I was wondering if anyone knew of a way to call a web site using fopen. Let
me tell you how things are set up and what I'm trying to do. I can call
fopen to read a site and then echo it back out. That's not a problem. The
problem I run into is when I try to go to a restricted area of a
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 stream:
HTTP request failed!
-Original Message-
From: John Taylor-Johnston [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 19, 2005 7:03 AM
To: php-general@lists.php.net
Subject: [PHP] fopen
What can I add to get more info from the die? Do I have to specify a
pathname in $defaultfile?
Start by _removing_
Hi,
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? Do I «have» to specify a pathname
in $defaultfile?
John
$defaultfile = ffmail.txt; #default file to write to
@ $results = fopen($datafilename, a); #open
Warren Vail wrote:
I am using fopen with a url to open a remote file (read only of course).
The url I am providing results in a redirect and the fopen seems to be
smart
enough to follow the redirect to return the actual file contents. How can
I
get at the redirected filename?
The problem
this helps,
Warren Vail
-Original Message-
From: Mulley, Nikhil [mailto:[EMAIL PROTECTED]
Sent: Friday, October 08, 2004 6:58 AM
To: Adam Williams; php-general@lists.php.net
Subject: RE: [PHP] fopen and http://
May be the path is not the correct ,just check with the Web
Directory
Warren Vail wrote:
Hi, I'm having a problem with fopen and http files. I keep getting the
error:
Warning: fopen(http://zed/htdocs/rgfindingaids/series594.html )
[function.fopen]: failed to open stream: HTTP request failed!
HTTP/1.1 404
Not Found in
I am using fopen with a url to open a remote file (read only of course).
The url I am providing results in a redirect and the fopen seems to be smart
enough to follow the redirect to return the actual file contents. How can I
get at the redirected filename?
The problem is the file contains html
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
--
Diana Castillo
Global Reservas, S.L.
C/Granvia 22 dcdo 4-dcha
28013 Madrid-Spain
Tel : 00-34-913604039 Ext 216
Fax :
http://uk.php.net/header should help you.
BTW, you should address your replies to the list and not to individual ppl.
Mikey
-Original Message-
From: Diana Castillo [mailto:[EMAIL PROTECTED]
Sent: 17 February 2005 12:36
To: [EMAIL PROTECTED]
Subject: Re: [PHP] FOPEN
how do I
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
You may be able to do embed the username/password in your URL:
$file =
HI all,
I have a script that uses fopen to acces for read a file using ftp:
$filepointer = fopen($address,'r');
having $address string formed this way:
$address =
ftp:/
/.$FTPuser.:.$FTPpassword.@.$FTPserver./.$FileFolder./.$FileNa
me;
This script always worked for me, it has now stopped
Giulio wrote:
HI all,
I have a script that uses fopen to acces for read a file using ftp:
$filepointer = fopen($address,'r');
having $address string formed this way:
$address =
ftp:/
/.$FTPuser.:.$FTPpassword.@.$FTPserver./.$FileFolder./.$FileNa
me;
You really don't need all those '.'
Why not use the built in FTP functions instead of fopen?
us2.php.net/ftp
Those should be able to handle any of the address problems you have,
seeing as they don't use the ftp://username:[EMAIL PROTECTED] syntax,
they open a connection and work with the FTP system.
--
The Disguised Jedi
[EMAIL
Richard Lynch wrote:
Al wrote:
Richard Lynch wrote:
Al wrote:
I've got a script that fetches a stream from a file on our virtual host.
Its
been working fine; but, yesterday they changed something and it no
longer
works.
Can you define no longer works a bit more clearly...
Error messages?
Just
I've got a script that fetches a stream from a file on our virtual host. Its
been working fine; but, yesterday they changed something and it no longer works.
$fp= fsockopen(www.oursite.org, 80, $errno, $errstr, 30);
I can use any remote site and fscockopen works fine.
Anyone have a suggestion as
Al wrote:
I've got a script that fetches a stream from a file on our virtual host.
Its
been working fine; but, yesterday they changed something and it no longer
works.
Can you define no longer works a bit more clearly...
Error messages?
Just times out?
What?
$fp=
Richard Lynch wrote:
Al wrote:
I've got a script that fetches a stream from a file on our virtual host.
Its
been working fine; but, yesterday they changed something and it no longer
works.
Can you define no longer works a bit more clearly...
Error messages?
Just times out?
What?
$fp=
Richard Lynch wrote:
Al wrote:
I've got a script that fetches a stream from a file on our virtual host.
Its
been working fine; but, yesterday they changed something and it no longer
works.
Can you define no longer works a bit more clearly...
Error messages?
Just times out?
What?
$fp=
Al wrote:
Richard Lynch wrote:
...
$str=
file_get_contents(localhost?page=processqueuelogin=Pminpassword=x)
$str =
file_get_contents('http://localhost/?page=processqueuelogin=Pminpassword=x');
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Al wrote:
Richard Lynch wrote:
Al wrote:
I've got a script that fetches a stream from a file on our virtual host.
Its
been working fine; but, yesterday they changed something and it no
longer
works.
Can you define no longer works a bit more clearly...
Error messages?
Just times out?
Sebastian wrote:
Q I hope you have some good data validation going on too :)
I am not too sure about how secure it is. basically, the files are called by
an ID
eg, download?type=fileid=3
so i query the db to get check if its a valid id and get the filename from
the db as well.
if its not found it
Hi all,
I have created a download manger to handle files, when a user clicks a link
the file is sent though fopen() and fpassthru()
like this:
header(Content-type: application/octet-stream);
header(Content-disposition: attachment; filename= . $file['filename']);
header(Content-transfer-encoding:
Sebastian wrote:
Hi all,
I have created a download manger to handle files, when a user clicks a
link
the file is sent though fopen() and fpassthru()
like this:
fopen() + fpassthru() == http://php.net/readfile
is this the most practical way of doing it? i don't want to display file
Hello Sebastian,
Tuesday, December 14, 2004, 4:19:31 PM, you wrote:
S header(Content-type: application/octet-stream);
S header(Content-disposition: attachment; filename= . $file['filename']);
S header(Content-transfer-encoding: binary);
S header(Content-length: . filesize($file['path'] .
Richard Davey wrote:
no need to exit() - it's the last line of
your script anyway.
There was a bug in PHP for a very brief period of time where scripts were
not ending under some conditions after all the content was delivered.
If one is running that version of PHP, exit; at the end of a script
Sebastian wrote:
Q I hope you have some good data validation going on too :)
I am not too sure about how secure it is. basically, the files are called
by
an ID
eg, download?type=fileid=3
so i query the db to get check if its a valid id and get the filename from
the db as well.
if its not
for me and find any flaws
;)
thanks.
- Original Message -
From: Richard Davey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 14, 2004 12:27 PM
Subject: Re: [PHP] fopen/fpassthur
Hello Sebastian,
Tuesday, December 14, 2004, 4:19:31 PM, you wrote:
S header(Content
Hi all,
I have created a download manger to handle files, when a user clicks a link
the file is sent though fopen() and fpassthru()
you could try http://us3.php.net/readfile
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi, my new server has fopen by url disabled. My ISP doesn't want to turn it
on. So is there a way to do an equivilant function some other way? I need
to read a remote webpage and manipulate it.
Thanks,
Chuck
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
On Wed, 20 Oct 2004 10:46:34 -0500, Chuck Barnett
[EMAIL PROTECTED] wrote:
Hi, my new server has fopen by url disabled. My ISP doesn't want to turn it
on. So is there a way to do an equivilant function some other way? I need
to read a remote webpage and manipulate it.
#!/usr/bin/php
?php
-- Original message from Chuck Barnett : --
Hi, my new server has fopen by url disabled. My ISP doesn't want to turn it
on. So is there a way to do an equivilant function some other way? I need
to read a remote webpage and manipulate it.
Thanks,
Chuck
You
CURL?
http://www.php.net/manual/en/ref.curl.php
Warren Vail
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 20, 2004 10:25 AM
To: Chuck Barnett
Cc: PHP General List
Subject: Re: [PHP] fopen by URL is disabled, is there another way
Hi, I'm having a problem with fopen and http files. I keep getting the
error:
Warning: fopen(http://zed/htdocs/rgfindingaids/series594.html )
[function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 404
Not Found in /home/awilliam/public_html/rgfaidstest.php on line 15
1 - 100 of 335 matches
Mail list logo