4 posts by 2 authors in: Forums > CMS Builder
Last Post: January 6, 2020   (RSS)

By ht1080z - January 2, 2020

Happy New Year for everybody!

After I moved to a new server, started to get only error messages in the log like:

#41133 - E_ERROR: ob_start(): Cannot use output buffering in output buffering display handlers
/var/www/vhosts/ (line 494)

and not getting errors for any other different issues on my project.

Any advice would be appreciated,

By daniel - January 2, 2020

Hi Karls,

To help troubleshoot this issue, could you let me know what version of CMSB you are using, as well as the PHP version running on the server?


Technical Lead

By daniel - January 6, 2020

Hi ht1080z,

This is an issue that has been fixed in newer versions of CMSB, so one solution is to upgrade to the latest version. It is also relatively simple to patch the bug as a short term fix.

To do so, replace the following line in /cmsb/lib/errorlog_functions.php (line 494):

ob_start(); echo '1'; $ob_get_clean_response = ob_get_clean();

With this:

    // test if ob_start/ob_get_clean() is working.
    $ob_get_clean_response  = '1';
    $inOutputBufferCallback = 0;  // PHP throws an error if you call output buffering inside an output buffer callback
    foreach (ob_get_status(true) as $bufferStatus) { if ($bufferStatus['type'] == 1) { $inOutputBufferCallback = true; break; }}
    if (!$inOutputBufferCallback) { ob_start(); echo '1'; $ob_get_clean_response = ob_get_clean(); }

One of the cases where this issue can pop up is when trying to log an error, so it's possible that adding this fix could expose a different error message. Let me know if you need any further help!


Technical Lead