Lost session data when setting http headers (in CodeIgniter) Lost session data when setting http headers (in CodeIgniter) codeigniter codeigniter

Lost session data when setting http headers (in CodeIgniter)


I would start investigating this problem by comparing the HTTP content-length, content-type, and all the other headers sent by the web server when pointing to the physical .wav file, with the headers sent when trying to open the PHP script. I think the actual content body is correct, according to your post stating that if you download the file as an attachment, it can be played with an audio player application.


Try adding this header in there:

header('Content-Transfer-Encoding: binary');

See if that helps it out.