RE: [PHP] File download question

2009-09-06 Thread Andrea Giammarchi
That is for IE and its silly FileName[N] rather than FileName here a good old function to download: http://www.devpro.it/code/72.html Regards > Date: Sun, 6 Sep 2009 15:43:27 -0300 > From: tapi...@gmail.com > To: chris_pa...@danmangames.com > CC: php-general@lists.php.net > Su

Re: [PHP] File download question

2009-09-06 Thread Jonathan Tapicer
I think that your problem in this line: header("Content-Disposition: filename=$file" . "%20"); I don't know what that %20 is for and you should quote the filename, that line should be something like this: header("Content-Disposition: attachment; filename=\"$file\""); Considering that $filenam

Re: [PHP] File download problem

2008-08-19 Thread tedd
At 3:32 PM +0100 8/19/08, Ashley Sheridan wrote: That bug report makes sense now, in light of your problem. It wasn't something I'd ever seen happen before, as most of my work is done on Linux, and the bug seems to be specific to the way Windows uses the BOM for UTF-8 PHP files. Ash: A probl

Re: [PHP] File download problem

2008-08-19 Thread Ashley Sheridan
That bug report makes sense now, in light of your problem. It wasn't something I'd ever seen happen before, as most of my work is done on Linux, and the bug seems to be specific to the way Windows uses the BOM for UTF-8 PHP files. Ash www.ashleysheridan.co.uk --- Begin Message --- I just add this

Re: [PHP] File download problem

2008-08-19 Thread Stefano Noffke
I just add this comment for reference. I found this bug report on the PHP Web site: http://bugs.php.net/bug.php?id=22108 That bug explains everything :) Stefano Stefano Noffke wrote: Thanks for the reply. I think I found the problem here: The php file was saved with UTF-8 encoding, and for

Re: [PHP] File download problem

2008-08-19 Thread Stefano Noffke
ysheridan.co.uk ---- Subject: Re: [PHP] File download problem From: Stefano Noffke <[EMAIL PROTECTED]> Date: Tue, 19 Aug 2008 15:17:25 +0200 To: php-general@lists.php.net To: php-general@lists.php.net I checked the files with an HEX editor, and I found that each downloaded file starts with "EFBB

Re: [PHP] File download problem

2008-08-19 Thread Ashley Sheridan
I had a similar problem with a script I was using to stream video clips to a user from a directory that was not accessible through the web. Turned out I had already sent some HTML content down to the browser without realising it. I'll go out on a limb here and guess that those three bytes you're se

Re: [PHP] File download problem

2008-08-19 Thread Stefano Noffke
I checked the files with an HEX editor, and I found that each downloaded file starts with "EFBBBF", and after those three bytes follows the regular file. If I delete those three bytes, I can open the files just fine. Now the question is: Why do I get those three extra bytes at the beginning o

Re: [PHP] File download problem

2008-08-18 Thread Stefano Noffke
Hi, Thank you for your reply. I tried your code, but the problem remains. I still can download PDF, TXT, and MP3 fine, but the ODT, DOC, and JPG are still corrupted. I wonder why it works with some files and not with others... Stefano Ashley Sheridan ha scritto: Hi Stefano, You can use th

Re: [PHP] File download problem

2008-08-18 Thread Ashley Sheridan
Hi Stefano, You can use this code instead to read in the file and output it to the browser, as it is binary safe. I've used it for the same reason you require, and it works fine with video clips. $fp = fopen($path, "rb"); while(!feof($fp)) { print(fread($fp, 1024)); flush($fp); } fc

Re: [PHP] File Download Headers

2006-06-15 Thread Richard Lynch
On Thu, June 15, 2006 10:17 am, Jon Anderson wrote: > Richard Lynch wrote: >> Can any experts on this list explain to me why, despite the >> 1,000,000 >> places that application/octet-stream is documented to work, and has >> always worked, since Mosaic 1.0 days, people manage to find these >> goofb

Re: [PHP] File Download Headers

2006-06-15 Thread Jon Anderson
Richard Lynch wrote: Can any experts on this list explain to me why, despite the 1,000,000 places that application/octet-stream is documented to work, and has always worked, since Mosaic 1.0 days, people manage to find these goofball Content-type: headers that are supposed to work, but only work

Re: [PHP] File Download Problems

2004-09-16 Thread Marek Kilimajer
John Holmes wrote: From: "PHP Junkie" <[EMAIL PROTECTED]> As my link to the download file, I changed it to And changed the code in the download file to How are you validating $F and ensuring it's not a path to any file on your server? imsafm_user_dl.php?F=/home/path/to/secret/file.txt It's a F

Re: [PHP] File Download Problems

2004-09-16 Thread John Holmes
From: "PHP Junkie" <[EMAIL PROTECTED]> As my link to the download file, I changed it to And changed the code in the download file to How are you validating $F and ensuring it's not a path to any file on your server? imsafm_user_dl.php?F=/home/path/to/secret/file.txt ---John Holmes... -- PHP G

Re: [PHP] File Download Problems

2004-09-16 Thread PHP Junkie
Ave, I made a change last evening, and since the change.. It seems to be working fine. Thus far I haven't had the 1 KB downloaded file problem. I have been trying all evening and this morning, from different places, and somehow right now it seems to be working fine. What I simply did was this:

Re: [PHP] File Download Problems

2004-09-16 Thread Chris Dowell
Chances are your 1KB file contains an error message - try changing the Content-Type to text/plain or text/html to see what PHP is throwing at you Cheers Chris Marek Kilimajer wrote: PHP Junkie wrote: Ave, I've been having a very nagging and frustrating problem for a while and I hope someone can

Re: [PHP] File Download Problems

2004-09-15 Thread Marek Kilimajer
PHP Junkie wrote: Ave, I've been having a very nagging and frustrating problem for a while and I hope someone can help me out with this. I created a simple File Manager application, a lot of you already know about it as you helped me with coding at different stages. The problem is this: The Downloa

Re: [PHP] File Download link not working in PHP 4.3.4

2004-03-31 Thread John W. Holmes
Check the comments on this page: http://us2.php.net/manual/en/function.session-cache-limiter.php ---John Holmes... - Original Message - From: "Andrew Hauger" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 31, 2004 11:18 AM Subject: Re: [PHP]

Re: [PHP] File Download link not working in PHP 4.3.4

2004-03-31 Thread Andrew Hauger
sposition: attachment; filename="product.'.$file_ending.'"' ); header ( 'Expires: ' . date ( 'r', 0 )); Still getting the same behavior, on both the Windows and Solaris platforms. Andy > From: Curt Zirzow [EMAIL PROTECTED] > Sent: Tuesday, March 30, 2004 9:56

Re: [PHP] File Download link not working in PHP 4.3.4

2004-03-30 Thread Curt Zirzow
* Thus wrote Andrew Hauger ([EMAIL PROTECTED]): > the file name. When the "OK" button is clicked, an > error dialog pops up with the message "Internet > Explorer cannot download ... [snipped URL]. Internet > Explorer was not able to open this Internet site. The > requested site is either unavailabl

Re: [PHP] File Download

2003-10-03 Thread Grant Rutherford
Maybe I should clarify this: I have a the php file: /var/www/html/dev/view_files_disply.php This file accepts a POST argument which identifies $filename (example 1392_foobar.txt) of a file stored on the server at: /var/www/html/files/1392_foobar.txt This filename is generated by PHP and is there

Re: [PHP] File download by php header...

2003-07-22 Thread Scott Fletcher
Found the problem. It is the odbc_connect() that cause the download to fall short of completing it's download. Weird! I think it's because the database connection have a slower response time than the download response time. PHP header should not be affected by the odbc function... But then I r

Re: [PHP] File download by php header...

2003-07-21 Thread Scott Fletcher
> btw, also on the content-disposition, not only will some browsers not > honor that, they will just use the name of the script as the 'save-as' > filename. That's okay with the 'save as' filename because no one know hte real filename on the webserver because it is renamed when it is download anyw

Re: [PHP] File download by php header...

2003-07-21 Thread Scott Fletcher
Um, problem is I don't have any scripts before this sample header function. So, something is up. Does the file size 49 MB have something to do with it? Okay, saw both of the replies, so will check them out. Thanks, Scott "Curt Zirzow" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]

Re: [PHP] File download by php header...

2003-07-21 Thread Curt Zirzow
* Thus wrote Scott Fletcher ([EMAIL PROTECTED]): > Hi! > > I'm using PHP 4.3.2 and IIS 5.0. I'm using the PHP header to > cause the webserver to download the file to the web browser. Some > of the time it work and some of the other time, it doesnt. I > haven't figured out why un

Re: [PHP] File download by php header...

2003-07-21 Thread Chris Hayes
At 16:15 21-7-03, you wrote: Hi! I'm using PHP 4.3.2 and IIS 5.0. I'm using the PHP header to cause the webserver to download the file to the web browser. Some of the time it work and some of the other time, it doesnt. I haven't figured out why until I looked in the error log which showed h

Re: [PHP] File Download?

2003-04-04 Thread Jason Wong
On Friday 04 April 2003 15:29, b b wrote: > It would be: > href="downloadFile.php?daFile=path/fileName">path/fileName > > I tried to print the _GET['daFile'] however if I am > using the header function in the same file then it > won't print a thing. Well, disable the file downloading section

Re: [PHP] File Download?

2003-04-03 Thread b b
It would be: path/fileName I tried to print the _GET['daFile'] however if I am using the header function in the same file then it won't print a thing. In fact it starts downloading. The only thing is that it doesn't catch the correct file name (though it downloads the actual daFile). Cheers,

Re: [PHP] File Download?

2003-04-03 Thread Jason Wong
On Friday 04 April 2003 13:51, b b wrote: > Why would the $daFile in the following code be > resolved to "". I am passing it via the url. > session_start(); > if($_SESSION['isValidSession'] == 'Y'){ > $daFile = $_GET['daFile']; - What URL are you using? - Have you t

Re: [PHP] File Download

2003-03-06 Thread Jim Lucas
have the file download in a popup window. after the down load the window will be gone. Then you don't have to worry about the refreshing of the main window. Jim - Original Message - From: "David Miller" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 06, 2003 8:30 AM Su

Re: [PHP] File download + HTTP auth problem.

2002-11-05 Thread rija
Simply, HTTP Authentification Header("WWW-Authenticate: Basic realm='something'") does not work with microsoft product, so you need to buy Microsoft authentification from Microsoft to do something like it. - Original Message - From: "Rodolfo Gonzalez" <[EMAIL PROTECTED]> To: <[EMAIL PROTE

RE: [PHP] File download doesn't work with SSL

2002-10-07 Thread John W. Holmes
the grunt work, at least. :) ---John Holmes... > -Original Message- > From: Chris Shiflett [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 07, 2002 11:22 PM > To: [EMAIL PROTECTED] > Cc: 'Tom Rogers'; [EMAIL PROTECTED] > Subject: Re: [PHP] File download do

Re: [PHP] File download doesn't work with SSL

2002-10-07 Thread Chris Shiflett
Yes, you're right. You might want to turn off the forced SSL temporarily to debug this, if that's possible. Nothing other than your browser or the Web server will be able to show you the HTTP communication over SSL, because it's all trash to everything in between. There may be settings in Oper

RE: [PHP] File download doesn't work with SSL

2002-10-07 Thread Peter Houchin
> > You can have multiple directives in that header: > > > > Cache-Control: no-cache, no-store > > > > Do you have a way to view the HTTP? > > No. Can you recommend a good method on windows? Should I get lynx or > does opera have a method to view all the headers? can't you view all headers etc in

RE: [PHP] File download doesn't work with SSL

2002-10-07 Thread John W. Holmes
> You can have multiple directives in that header: > > Cache-Control: no-cache, no-store > > Do you have a way to view the HTTP? No. Can you recommend a good method on windows? Should I get lynx or does opera have a method to view all the headers? ---John Holmes... -- PHP General Mailing L

Re: [PHP] File download doesn't work with SSL

2002-10-07 Thread Chris Shiflett
You can have multiple directives in that header: Cache-Control: no-cache, no-store Do you have a way to view the HTTP? Chris John W. Holmes wrote: >I had tried it with both cases, actually, just to be sure. It did not >make a difference. If the session is sending a no-cache header, would >the

RE: [PHP] File download doesn't work with SSL

2002-10-07 Thread John W. Holmes
[EMAIL PROTECTED]] > Sent: Monday, October 07, 2002 8:45 PM > To: Rasmus Lerdorf > Cc: 1LT John W. Holmes; [EMAIL PROTECTED] > Subject: Re: [PHP] File download doesn't work with SSL > > Are you sure? > > I think (I might be wrong) using PHP sessions automatically sends t

Re: [PHP] File download doesn't work with SSL

2002-10-07 Thread Chris Shiflett
Are you sure? I think (I might be wrong) using PHP sessions automatically sends the Cache-Control header. I cannot remember what directives it uses. Perhaps the fact that you do not use correct case makes PHP miss the fact that you want to reassign Cache-Control to use a different value? If t

Re: [PHP] File download doesn't work with SSL

2002-10-07 Thread Rouvas Stathis
rding this issue? > > ---John Holmes... > > - Original Message - > From: "Rouvas Stathis" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: "1LT John W. Holmes" <[EMAIL PROTECTED]> > Sent: Monday, October 07, 2002 2:00 PM >

Re: [PHP] File download doesn't work with SSL

2002-10-07 Thread 1LT John W. Holmes
'excel'"); > > > header("content-disposition: attachment; filename=" . $filename . > > > ".xls"); > > > > > > and I'm still getting the same thing. Is the no-cache cache-control header > > > s

Re: [PHP] File download doesn't work with SSL

2002-10-07 Thread Rouvas Stathis
; code. > > > > Any help is appreciated. > > > > ---John Holmes... > > > > - Original Message - > > From: "Rasmus Lerdorf" <[EMAIL PROTECTED]> > > To: "1LT John W. Holmes" <[EMAIL PROTECTED]> > > Cc: <[EM

Re: [PHP] File download doesn't work with SSL

2002-10-07 Thread Rasmus Lerdorf
> - Original Message - > From: "Rasmus Lerdorf" <[EMAIL PROTECTED]> > To: "1LT John W. Holmes" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Monday, October 07, 2002 10:08 AM > Subject: Re: [PHP] File download doesn't work w

Re: [PHP] File download doesn't work with SSL

2002-10-07 Thread 1LT John W. Holmes
sent automatically by PHP at all? I don't have one set explicitly in my code. Any help is appreciated. ---John Holmes... - Original Message - From: "Rasmus Lerdorf" <[EMAIL PROTECTED]> To: "1LT John W. Holmes" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]&

Re: [PHP] File download doesn't work with SSL

2002-10-07 Thread 1LT John W. Holmes
> Does it work with a different browser? Smells like an IE bug to me. Doesn't everything with IE smell like a bug? Anyhow, it works fine with Netscape. Opera will not open the file, but will save-as just fine when prompted. I'm off to search MS... help me... ---John Holmes... > > Everyone,

Re: [PHP] File download doesn't work with SSL

2002-10-07 Thread Rasmus Lerdorf
Does it work with a different browser? Smells like an IE bug to me. On Mon, 7 Oct 2002, 1LT John W. Holmes wrote: > Everyone, > > I've had a simple download script working where a user would click on a link and the >program would send word or excel headers instead of HTML. The file would then

RE: [PHP] file download in IE

2002-04-23 Thread Rodolfo Gonzalez
On Tue, 23 Apr 2002, .ben wrote: > I think this is only an issue with an un-patched IE5.01, anything higher > than that should work fine. In my experience, there're problems even with MSIE 6.x. Regards, Rodolfo. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://

RE: [PHP] file download in IE

2002-04-23 Thread .ben
I think this is only an issue with an un-patched IE5.01, anything higher than that should work fine. .b > -Original Message- > From: Negrea Mihai [mailto:[EMAIL PROTECTED]] > Sent: 23 April 2002 12:26 > To: [EMAIL PROTECTED] > Subject: [PHP] file download in IE > > > Hi! > > How on eart

Re: [PHP] File Download Inquiry

2001-11-19 Thread Douglas McKenzie
You can just link to the file eg download file just make sure the path is correct. Joe Van Meer wrote: > Hi there. How would I go about downloading a file off of the server. The > filename will always be the same in my case. Say it is sitting in a > directory called 'textfiles'. What method/fun

RE: [PHP] File Download IE behavior

2001-07-11 Thread Chadwick, Russell
If you want it to automatically be saved to disk, send the header("Content-type: octet/stream"); If there is a problem with the open I would think its on the client side since theres nothing mor the server can do but specify a content type. -Original Message- From: Warren Vail [mailto:[

Re: [PHP] file download

2001-05-23 Thread py
Hello, I had the same problem as you for months! until someone post this a couple of weeks ago: header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=file.txt"); include("file.txt"); py - Original Message - From: Aleksey Yarilovets <[EMAIL P

RE: [PHP] File Download Completion

2001-02-02 Thread Boaz Yahav
While we are on the subject, I made some tests with Apache logs and it seems that Apache writes the size of the file that you are DL to the log file at the beginning of the transfer. So if you are DL a 1MB file apache will write that you have DL a 1MB file and it doesn't reflect weather you stopp

Re: [PHP] File Download Completion

2001-02-01 Thread Daniel Grace
On Wednesday, January 31, 2001 at 12:00 PM, "Boaz Yahav" <[EMAIL PROTECTED]> wrote: > Seems like your theory doesn't stand the reality test :) > > This is the script which for some reason works with Netscape but not with IE > (it used to) : >ignore_user_abort(0); >$filename="test.gz"; >

RE: [PHP] File Download Completion

2001-01-31 Thread Boaz Yahav
essage- From: Daniel Grace [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 2:37 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] File Download Completion "Boaz Yahav" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Is it possible

RE: [PHP] File Download Completion

2001-01-31 Thread Boaz Yahav
.4pl1 any idea? -Original Message- From: Daniel Grace [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 31, 2001 2:37 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] File Download Completion "Boaz Yahav" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news

RE: [PHP] File Download Completion

2001-01-31 Thread Boaz Yahav
ry 31, 2001 2:55 PM To: Boaz Yahav; Php-General Subject: Re: [PHP] File Download Completion Hi Berber, The only way I've figured this at the moment is to use the web server access logs. They will tell you how many bytes were transfered, if it matches the file size then transmission was

Re: [PHP] File Download Completion

2001-01-31 Thread Andy Woolley
Hi Berber, The only way I've figured this at the moment is to use the web server access logs. They will tell you how many bytes were transfered, if it matches the file size then transmission was potentialy succesful. I'm trying to think of a better way using PHP and maybe JavaScript but at the m

Re: [PHP] File Download Completion

2001-01-31 Thread Daniel Grace
"Boaz Yahav" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Is it possible to find out if a client finished to DL a file? > > Suppose i put a link to a file and people start to DL the file. > Some people can stop the DL in the middle. I need to know > how many