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.