apcu
apcu copied to clipboard
Supported SAPI
Some SAPI's are not supported (#160, IIS issue, others).
pthreads forces a fatal error to occur when it is loaded in an unsupported SAPI.
APCu could do the same, we know very well what a whitelist should look like (fpm, apache2, cli, phpdbg) ... should we do it to avoid confusion going forwards ?
:+1:
+1
Maybe you should blacklist and add another entry in case issues appear. That helps if it works with not listed SAPIs without first doing extra changes.
Yeah, maybe a blacklist is more appropriate ...
Thoughts @remicollet @weltling ?
Is there any way to detect if we're in a prefork SAPI besides simply checking a list?
I think not, or not reliably anyway ...
I proper error would certainly be useful for people me thinks.
From my curent experience with the standard SAPIs and platforms, there is no real distinct way to catch all the cases.
The clear white list cases are:
- Apache mpm_prefork and mpm_winnt
- FPM
- forked FCGI
The clear black list cases are:
- Apache mpm_worker, mpm_event
Not clear cases, that are impossible to determine, are:
- Any kind of usage of FCGI without fork (fe IIS, Apache mod_fcgi, nginx) with more than one process
- CLI in the mix of any server usage
- possible custom SAPIs or embed implementations we have no idea about
This makes it not so simple to determine what were exactly to block. I think the white list could work, and otherwise a warning should be thrown, that proper functionality couldn't be ensured. Probably some chunk on documentation were not overmuch.
Thanks.