On 2018-03-21 21:59, j adams wrote:
> So what's the story with PHP and multithreaded environments these days?
Unfortunately PHP was never and will most likely never be threadsafe as
a module.
(Yes, I know that there's the ZTS code, but hey, are you really serious
about this?)
I never understood why the core devs never switched to a threaded model,
but I believe they never deemed it truly necessary.
The ZTS threaded module has a few interesting approaches but fails in
some other areas. To be honest, I suggest to use the fpm-cgi SAPI module
with an Apache threaded environment.
> Does this statement on the PHP website still stand?
> http://www.php.net/manual/en/faq.installation.php#faq.installation.apache2
Sorry, didn't read it.
> Seems a bit archaic these days to eschew multithreaded environments,
> doesn't it?
Yes, it is. Doesn't change the fact that PHP is not threadsafe.
> More specific questions:
> * is there any kind of authoritative list of PHP modules that are NOT
> threadsafe? If so, where might I find it?
No, there isn't. But if you run php via fpm, it doesn't really matter
anyway.
> * What warnings, indications, failures, or errors, if any, might I
> encounter if I am experiencing undesirable behavior by using PHP in an
> event or worker environment?
I use an event MPM on my server with an fpm cgi module
Cheers,
K. C.
--
regards Helmut K. C. Tessarek KeyID 0x172380A011EF4944
Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944
/*
Thou shalt not follow the NULL pointer for chaos and madness
await thee at its end.
*/