By default, XAMPP sets the output_buffering value to 4096. (Thus, content is provided in 4K fragments - a possible performance advantage. Although this can lead to unexpected errors (for example, “already sent headers”, etc.) when deploying to the server, where it is disabled, which, by the way, is the standard default PHP).
In php.ini :
; Default Value: Off ; Development Value: 4096 ; Production Value: 4096 ; http:
Set for:
output_buffering=Off
And reboot the server.
source share