ob_flush() not working
I'm using cpanel shared web hosting. I have tested my code on localhost and uploaded to server. Some of my php files takes around 5 minutes to complete execution (Some api call delays). I want to send response to the user early and I'm using ob_flush() for that. But the response is send only after complete execution.
eg:
-
I have tested this code in an aws ec2 instance and it behaves as expected. Problem is only with shared hosting. Any help will be appreciated. 0 -
Hello @Basil K Y, A similar thread is linked below, but without root access you won't be able to make the suggested change or verify if those settings are applicable to your issue: I recommend reaching out to your web hosting provider for assistance. Your provider can verify how the system is configured (e.g. settings such as PHP handler, enabled Apache/PHP modules) and be able to better determine why ob_flush() isn't working as expected. Thank you. 0
Please sign in to leave a comment.
Comments
2 comments