save to 'php://output' gives me a corrupted file

Topics: Developer Forum, User Forum
Feb 3, 2011 at 2:34 PM
Edited Feb 3, 2011 at 2:36 PM

Hi there!

On my localhost everything works, also the output to stream ('php://output').

But uploading it to the server it gives me a corrupted file. I havent found no error message.

Also on the server the file gets created correct when saving it to a file on the server.


Could it be messing with the headers? headers_list() gives me the following bevor I am sending my feaders for the file.


[0] => Expires: Thu, 19 Nov 1981 08:52:00 GMT
[1] => Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
[2] => Pragma: no-cache

[EDIT] I'm using Excel5 [/EDIT]

Anybody with an idea?


Feb 3, 2011 at 5:06 PM

Okay, it has definitly nothing to do with PHPExcel. I did create a file once and then I was trying to download it by sending the headers and a simple readfile(), same result.

Anyway, has someone a hint why files are getting corrupted when using redfile() on my webserver?