4

I wanted to turn output buffering off. Currently it shows no value for local and master. I run ini_set('output_buffering',4092); and no changes in phpinfo(). Safe mode is off.

What's the next thing to check?

Jared Eitnier
  • 7,012
  • 12
  • 68
  • 123
  • 1
    `output_buffering` is a harmful directive. You always can write a *proper* code that doesn't rely on it. So how about fixing the root of the issue, not pretending there is no any? – zerkms Feb 14 '13 at 03:39
  • 2
    That doesn't in any way address my *question*. I am not asking for best practice. I want to know why it isn't working. – Jared Eitnier Feb 14 '13 at 03:43
  • Are you able to edit the `php.ini`? You might have more luck setting the directive directly. – Danny Beckett Feb 14 '13 at 03:47
  • @Jared Eitnier: "I am not asking for best practice" --- it's actually very common for newbies to now know how to implement things properly. That's why here on stackoverflow the advices about best practices are preferred over a direct answers to the questions. So, uhm, it's the case when instead of producing another piece of bad code you have a great chance to write something nice. – zerkms Feb 14 '13 at 03:49
  • @zerkms I understand and this is a constant disagreement between users on this network however if I wanted best practice I would have also asked for that advice. I do appreciate your advice though, thanks. – Jared Eitnier Feb 14 '13 at 03:51

1 Answers1

14

output_buffering can only be set via PHP_INI_PERDIR which according to the documentation is:

Entry can be set in php.ini, .htaccess, httpd.conf or .user.ini (since PHP 5.3)

Only PHP_INI_ALL and PHP_INI_USER allows setting directive inside a PHP file.

kittycat
  • 14,983
  • 9
  • 55
  • 80