Triggering a PHP Script
| From: | Ryan Bates | Date: | Mon, 02 Dec 2002 17:14:57 +0000 |
| Subject: | Triggering a PHP Script | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-126729@lists.php.net to get a copy of this message | ||
My Problem:
I've got a PHP script (running on Apache) that can take several hours to complete. The script sends out a newsletter to those who have requested it. When calling this script from a web browser, the browser hangs until the script has fully executed. If the user hits "Stop" while the script is running, it will terminate the script.
My Questions:
What is the best way to trigger this script? Is there a way to do it without using a CGI script? I am basically wondering if there is a way to create a "trigger this php page" script that will run the script on Apache and not hang the browser. Also, are there any problems calling MySQL from a PHP CGI script?
Thanks,
Ryan Bates