I want to share a problem I had, the fix I found and then ask a question about the reason behind the fix.
The problem
After upgrading to wampserver 2.2, one of my webpages consistently didn't work the first time it was loaded in the browser. This happened with internet explorer, chrome, firefox and safari. When reloaded the page worked in all browsers.
the fix
I decided to implement a better debugging solution and while doing so inadvertently fixed my problem. When I set output_buffering =On
in php.ini the page worked correctly.
my code
I'm not going to go into detail here. I'm more interested in theory for how output_buffering could be causing problems. Also I think my code will be more of an eyesore than a help.
- I used ajax and joomla sessions (external script) to retrieve information for the page.
- I believe that when output_buffering was off, the joomla session was not able to retrieve values. I'm not able to confirm this yet though.
My question
In what ways can output_buffering= Off
adversely affect code? Why?