Re: Header problem - "solved"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrea Giammarchi wrote on 2009-10-05 18:26:

 > There's a useful function called headers_sent() which checks to see if
 > the headers have already been sent to the browser. This might be a good
 > place to throw into your code at various points to check and see if
 > something is being written which you don't expect.

true, check that as well, moreover, you talked about utf-8, well, if the BOM is automatically added, it can cause lots of problems ... still, only if you sent whatever to the output before the download.

I've tried a bunch of things, including link to index.php and as first thing check if the request is a zipfile, then throw a zip header, readfile the file then exit the code. Nothing helped. So I figured it could be a latin-1 / utf-8 problem and tried to post to a fresh new page (donwload_zip.php) instead, where I was sure the terminal and Vi was set to use latin-1, then it worked.

It's still not the ultimate solution as we wanted the zipfile to be created on the fly in memory in order not to have to delete files afterwards and to be sure that only allowed users can fetch the files (of course you can always put the zipfiles outside webscope, but still...)

--
Kind regards
Kim Emax

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux