juanpablo Posted February 24, 2010 Share Posted February 24, 2010 Hi. I've been trying to find a way to get to create a thread in PHP. The main idea is to create a thread that won't print anything or generate any HTML at all. What I want to do is to create a separate process that sends email and reports problems related to either bugs or security incidents that happen on the site. Sending mails can take a while so the user shouldn't notice that the page takes longer to load. That's why I want to create a separate process. Like this: // a problem was found $id = registerProblem(); // adds data to the database and returns id processProblem($id); // creates a new thread and processes the problem found. Now, is there any way to create a new thread that I don't care if takes too long to end or whether it finishes before the calling php. All I want is to have an independent thread. Is there any way to achieve this? Thanks Link to comment https://forums.phpfreaks.com/topic/193158-php-multithreading-when-run-as-apache-module/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.