Skip to content

Bug: Blank Page on Production Server #2980

Closed
@Andrewsuares

Description

@Andrewsuares

Using Codeigniter 4.0.3

We were seeing a blank page after uploading CodeIgniter to our linux server. After days of troubleshooting, I figured this was the problem below in Events.php. Disabled it from line 25 and the page loaded. Can you please fix this. Codeigniter 3 was known to just work out of the box. Having an IF statement here that works only on production means that devs wouldn't see this during testing.
Events::on('pre_system', function () {
if (ENVIRONMENT !== 'testing')
{
while (\ob_get_level() > 0)
{
\ob_end_flush();
}

	\ob_start(function ($buffer) {
		return $buffer;
	});
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions