Unknown output buffering mode


After my hosting upgraded to PHP7, I am getting this error in my code: “Unknown output buffering mode”.

I am not trying to set any output buffering, so I don’t understand how to fix this?

Are there some env. settings I should configure specifically for PHP7?

<b>Fatal error</b>:  Uncaught InvalidArgumentException: Unknown output buffering mode in /var/www/michelsen.dk/regexcrossword/api/vendor/slim/slim/Slim/Route.php:185
Stack trace:
#0 /var/www/michelsen.dk/regexcrossword/api/vendor/slim/slim/Slim/App.php(248): Slim\Route-&gt;setOutputBuffering(NULL)
#1 /var/www/michelsen.dk/regexcrossword/api/vendor/slim/slim/Slim/App.php(146): Slim\App-&gt;map(Array, '/{achievementId...', Object(Closure))
#2 /var/www/michelsen.dk/regexcrossword/api/handlers/achievements.php(10): Slim\App-&gt;get('/{achievementId...', Object(Closure))
#3 /var/www/michelsen.dk/regexcrossword/api/vendor/slim/slim/Slim/RouteGroup.php(45): Closure-&gt;{closure}()
#4 /var/www/michelsen.dk/regexcrossword/api/vendor/slim/slim/Slim/App.php(271): Slim\RouteGroup-&gt;__invoke(Object(Slim\App))
#5 /var/www/michelsen.dk/regexcrossword/api/api.php(51): Slim\App-&gt;group('/achievements', Object(Closure))
#6 {main}
  thrown in
<b>/var/www/michelsen.dk/regexcrossword/api/vendor/slim/slim/Slim/Route.php</b> on line


Not sure about your particular issue, but when I ran into this the root cause was that I had overwritten the core settings dependency in the Container. That caused null to get passed in Route.php and :bomb:


Which Slim version do you use exactly?

PS: I’ve only just seen that this question is very old.
Is it still pending or can it be “closed”?


If memory serves, this was caused by returning 204 No Content.

We found no way to solve this and had to modify our REST API to return 200 instead.

But since it is this old, I think we can close it. If I revisit this any time and still have the issue I can open a new one.