latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Remote auth file and output buffer

Home Forums Community Forum Remote auth file and output buffer

Tagged: 

This topic contains 0 replies, has 1 voice. Last updated by  Monte Goulding 4 years, 5 months ago.

Topic Author Topic
Posted: Sunday Aug 5th, 2012 at 2:41 am #21176
Monte Goulding
Username: monte

Hi

I’m trying to implement remote auth file downloads but s2Member doesn’t seem to clear the output buffer before serving the file so I get the file data (a zip file) and then the buffered content. I can use the returned content length as a workaround but I shouldn’t need to. I tried changing:

header("Content-Length: ".$length).exit(file_get_contents($file));

to

eval('while (@ob_end_clean ());');
header("Content-Length: ".$length).exit(file_get_contents($file));

In check_file_download_access but that didn’t help.

Cheers

Monte<

  • This topic was modified 4 years, 5 months ago by  Monte Goulding.
  • This topic was modified 4 years, 5 months ago by  Monte Goulding.
  • This topic was modified 4 years, 5 months ago by  Monte Goulding.
  • This topic was modified 3 years, 4 months ago by  Monte Goulding.

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.