PHP: Redirect but continue to process script with ignore_user_abort(true) fails -
PHP: Redirect but continue to process script with ignore_user_abort(true) fails -
i have problem cannot figure out. seems server related issue.
what need - when user submitting form, redirected page, php script continues process form info in background. code this:
//if form submitted start: //redirect user header("location: activity.php"); ob_end_clean(); header("connection: close"); ignore_user_abort(true); set_time_limit(1800); //extend process time ob_start(); header("content-length: 0"); ob_end_flush(); flush(); session_write_close(); //below line starts code process form.
when testing code on local server works expected, user redirected page activity.php
, php script continues run in background. when uploading same script live server, nil works. user not redirected, , page waits until processed , redirects user activity.php
.
why so? cannot see error in script. can please help? there bundle needs enabled on server? cannot understand why script works on 1 server fails on other. give thanks much.
php
Comments
Post a Comment