1

I have a PHP script that is running and I sometimes just want to restart apache and get rid of all running PHP scripts.

However, I have noticed after my restart, a PHP script will continue running. Why is this? Is there an option to make sure Apache does a proper restart? Or is the ignore_user_abort function causing this issue?

Thanks all for any help

2 Answers 2

1

It depends on how you're restarting httpd. A "soft restart" (e.g. killall -HUP httpd) allows currently-running httpd children to complete the request before dying. This eliminates occurrences of the browser just "dying" during a request, but it does mean that currently-running PHP scripts (since they run in the httpd child) will continue to run.

Sign up to request clarification or add additional context in comments.

Comments

1

PHP scripts can also be started from CLI si they run in background and do varios work. Those are not managed by apache, you have to manage them individually.

ignore_user_abort only ignores the user, you cannot really ignore the server shutddown:) unless you aren't really shutting down but just reloading configs, as Ignacio said above

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.