1 year ago

#366303

test-img

Shawn

PHP execution stops after closing browser tab

My site runs on nginx and PHP7.4 fpm. I have coded a backend script that can be called from the browser. For debug purpose I put quite a few error_log statements in the code.

I found that if I do any of the following the script will stop running - no error_log output.

  1. close browser tab
  2. press ESC
  3. cloudflare reaches timeout

It's almost immediate that any of the above events occure, output in the error log stops.

I tried putting ignore_user_abort(true) at the top of my script, didn't help.

What could be causing this? Shouldn't PHP script keep running till completion regardless of browser activity?

php

nginx

fpm

0 Answers

Your Answer

Accepted video resources