Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable output buffering on my local XAMPP server

For some reason my XAMPP server is buffering the output of my PHP. I want it to spit it out as it goes. Anyone any ideas which settings I need to change to achieve this?

like image 880
Mark Avatar asked Oct 25 '22 18:10

Mark


1 Answers

XAMPP appears to set output_buffering to 4096 by default. (So content is served in 4K chunks - a possible performance benefit. Although this can lead to unexpected bugs (eg. "headers already sent" etc.) if deploying on a server where this is disabled, which incidentally is the PHP default.)

In php.ini:

; Default Value: Off
; Development Value: 4096
; Production Value: 4096
; http://php.net/output-buffering
output_buffering=4096

Set to:

output_buffering=Off

And restart your server.

like image 115
DocRoot Avatar answered Nov 08 '22 01:11

DocRoot