• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • Our UX team believes in the in the power of direct feedback and would like to invite you to participate in interviews, tests, and surveys.
    To stay in the loop and never miss an opportunity to share your thoughts, please subscribe to our UX research program. If you were previously part of the Plesk UX research program, please re-subscribe to continue receiving our invitations.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Resolved Disable output buffering

Patashoow

Basic Pleskian
Server operating system version
Ubuntu 20.04
Plesk version and microupdate number
18.0.68
Hello,

I'm really struggling trying to find how to disable output buffering on my server.

I'm using Apache 2.4.41 with Nginx in proxy mode. I also have ModSecurity enabled with Comodo rules (free) and use PHP-FPM served by Apache.
I have set, in my "php.ini" file, the value of "output_buffering" to "8192" but as it's PHP related configuration, whenever I want to flush data, I can simply do it using PHP code.
But in my case, the requests always wait to complete before sending the whole result at once even when the code asks to flush the buffer.

So how is the output buffering controlled on Plesk? Is it possible to completely turn it off or even better, disabling it for a specific script?
 
The flushpackets option should help here, i.e. you can place the following option somewhere in the Apache2 configuration.

Code:
# disable output buffering for php-fpm/proxy_fcgi
<IfModule proxy_fcgi_module>
  <Proxy fcgi://127.0.0.1:9000 enablereuse=off flushpackets=on>
  </Proxy>
</IfModule>
 
Oh! My! Gawd! I've been trying for like 8 hours straight! You saved me so much time.
Thanks a lot! That indeed worked.

So from there, can I only apply it for a specific script and not the whole server?
 
For only one vHost, you should be able to put that config snippet into the "Additional Apache directives" option on the "Apache & nginx Settings" page in Plesk.

For only a specific script...well, never done that, no clue if something with <FilesMatch> or <Location> around that config snippet may work.
 
  • Like
Reactions: mow
I was about to answer myself.
It is indeed by using <FilesMatch>.
So thank you again! (so much!) I owe you a drink ;)

EDIT: I still don't know how to mark the question as solved.
 
Back
Top