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.

Disable Chunked/Flushed File Delivery

Home Forums Community Forum Unofficial Extensions/Hacks Disable Chunked/Flushed File Delivery

This topic contains 0 replies, has 1 voice. Last updated by  Jason (Lead Developer) 4 years, 10 months ago.

Topic Author Topic
Posted: Friday Mar 2nd, 2012 at 12:35 am #6958
Staff Member

Hack Description

Disables chunked/flushed file delivery, and forces s2Member to use a simpler method of delivering file downloads through a simple call to file_get_contents() instead. This might be desirable on some servers, where chunked and/or flushed delivery of file downloads is creating a conflict with GZIP or another server extension. Most of the time, this is NOT required. However, if you're having trouble, you might try this hack and see if makes a difference in your hosting environment.

Hack Instructions

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
(these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins)

<?php
add_filter("ws_plugin__s2member_chunk_file_downloads", "__return_false");
add_filter("ws_plugin__s2member_flush_file_downloads", "__return_false");
?>

Possible Negative Repercussions

Disabling both of s2Member's chunked and flushed file delivery methods may offer better compatibility across different platforms, but it also reduces your ability to serve VERY large files with s2Member. If you can run s2Member's File Downloads without this Hack, that's always better.

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.