apcu icon indicating copy to clipboard operation
apcu copied to clipboard

Supported SAPI

Open krakjoe opened this issue 9 years ago • 8 comments
trafficstars

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 ?

krakjoe avatar Dec 17 '15 15:12 krakjoe

:+1:

staabm avatar Dec 17 '15 15:12 staabm

+1

Stricted avatar Dec 17 '15 15:12 Stricted

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.

bwoebi avatar Dec 17 '15 17:12 bwoebi

Yeah, maybe a blacklist is more appropriate ...

Thoughts @remicollet @weltling ?

krakjoe avatar Dec 17 '15 17:12 krakjoe

Is there any way to detect if we're in a prefork SAPI besides simply checking a list?

hikari-no-yume avatar Dec 18 '15 01:12 hikari-no-yume

I think not, or not reliably anyway ...

krakjoe avatar Dec 18 '15 07:12 krakjoe

I proper error would certainly be useful for people me thinks.

PeeHaa avatar Dec 22 '15 17:12 PeeHaa

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.

weltling avatar Jan 08 '16 18:01 weltling