Generated PHP file has to check if APC module has been loaded
stollr opened this issue · 7 comments
Generated PHP file has to check if APC module has been loaded. Otherwise we just get a server error if the APC module is not loaded in the web server.
Sorry I cannot add another pull request, but you can look at my last commit of my fork:
https://github.com/naitsirch/ornicar-apc-bundle/commit/954fa7d793ecaad594ba96125570160680441fdf
Would be nice if this will be included ;-)
Thanks
I take it we'd also need to check in case APCu is being used instead (for user cache)?
Yes that should be done in the future. But APCu is not documented very well so far. I hope that will happen if PHP 5.5 will be reeleased.
It would be better to check if some apc_* function is defined. So you don't need to check for any extension (since functions implemented by APCu are the same as APC, or at least a subset of them)
Are you sure that APCu functions won't be prefixed with apcu_* ?
@Naitsirch that would make no sense. You can chek source yourself: https://github.com/krakjoe/apcu
Yap, seems fine. Thanks :-)