Disable output buffering on my local XAMPP server

For some reason, my XAMPP server is buffering the output of my PHP. I want him to spit it out. Any ideas what settings I need to change to achieve this?

+4
source share
3 answers

Check ob_end_flush() , the chapter of the output control manual - specifically php.ini settings .

Of course, if you just get a blank page, check your error reporting settings - it is very likely that the error stops the script, and you see nothing with the error message.

+1
source

if you are debugging this in Xdebug and checking the output in the browser, this can lead to several reasons. 1) php 2) Apache (web server) 3) Web browser

Read this for details:

http://muzso.hu/2008/02/19/php-output-buffering

0
source

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://php.net/output-buffering output_buffering=4096 

Set for:

 output_buffering=Off 

And reboot the server.

0
source

Source: https://habr.com/ru/post/1303815/


All Articles