Jump to content

PHP Multithreading when run as Apache Module?


juanpablo

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.