krakjoe / apcu

APCu - APC User Cache
Other
964 stars 196 forks source link

Supported SAPI #161

Open krakjoe opened 8 years ago

krakjoe commented 8 years ago

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 ?

staabm commented 8 years ago

:+1:

Stricted commented 8 years ago

+1

bwoebi commented 8 years ago

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.

krakjoe commented 8 years ago

Yeah, maybe a blacklist is more appropriate ...

Thoughts @remicollet @weltling ?

hikari-no-yume commented 8 years ago

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

krakjoe commented 8 years ago

I think not, or not reliably anyway ...

PeeHaa commented 8 years ago

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

weltling commented 8 years ago

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:

The clear black list cases are:

Not clear cases, that are impossible to determine, are:

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.