PHP Multi-threading
am 31.03.2008 09:23:52 von George Maicovschi
As multi-threading is not built in PHP I've been using a hack letting
the Apache server handle the multi-threading issues, but I'm really
curious of other approaches to this issue.
If anyone has any ideas I'd be more than glad to hear them up and
discuss them.
Re: PHP Multi-threading
am 31.03.2008 14:40:07 von Erwin Moller
George Maicovschi schreef:
> As multi-threading is not built in PHP I've been using a hack letting
> the Apache server handle the multi-threading issues, but I'm really
> curious of other approaches to this issue.
>
> If anyone has any ideas I'd be more than glad to hear them up and
> discuss them.
Hi George,
I take it you are working on Apache2?
Well, as far as I understood PHP isn't threadsafe (yet).
Not to mention all the additional packages (for DB access eg).
I wouldn't go for such an approach in any productionenvironment.
The following articles might shed some light on the issues:
http://certcities.com/editorial/columns/story.asp?Editorials ID=102
http://neosmart.net/blog/2008/dont-believe-the-lies-php-isnt -thread-safe-yet/
Unless you have some compelling reason to use a threaded webserver, I
think, for now, the best option is fastcgi, if performance is an issue.
If you are just experimenting, consider this message not sent. ;-)
Regards,
Erwin Moller