jeudi 10 septembre 2020

ob_flush(): failed to flush buffer. No buffer to flush

I am using Laravel 5.8, and I am trying to return 200 status code then continous excuting code, so, in my code:

        ob_start();
        header("Status: 200 OK");
        header('Content-Length: '.ob_get_length());
        ob_end_flush();
        ob_flush();
        flush();
... rest of the code

but I get the following error:

ob_flush(): failed to flush buffer. No buffer to flush

Only on production server I get this error, on my local machine everything is working smoothly.

how to solve it please?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire