Comments (14)
@Laurent3170 something like (pseudo-code):
public function __construct()
{
if (! function_exists('apcu_set')) {
throw new SomethingSomethingException('APCu is not installed: please install APCu before using the APCu cache');
}
}
from cache.
from cache.
from cache.
Thanks for your answer but can you explain a little bit more what should be done?
from cache.
@Laurent3170 you should make sure that the mentioned extension is installed on your environment.
from cache.
Closing as invalid
from cache.
@Ocramius I can understand that you close this, as it seems not to be an issue directly related to the project, but it's linked with, as the apcu_fetch()
is called by it.
So it can't work if the external library is not installed, and it may be indicated somewhere (maybe it is but I haven't found).
@lcobucci thanks, I will have a look at it, when I have time. For the time being I can only find information about php-pecl-apcu
from cache.
So it can't work if the external library is not installed, and it may be indicated somewhere (maybe it is but I haven't found).
Yes, feel free to send a patch that verifies if the APCu extension is installed at boot time, but it's not really needed out of the box.
from cache.
Euh... I do need to understand before how it works and how to implement it... If I was able to do so, maybe I will have not set this issue ;-)
from cache.
I am sorry to bother you but... I can't find how to install ext-apcu
on Centos, I just can't find anything about ext-apcu
.
On my dev (Ubuntu) I have php-apcu
but no packages seems to exists for Centos...
Moreover, when I use the command php bin/console doctrine:cache:clear-metadata --env=prod;
on my Centos prod server in a Symfony project, it works well, even if apcu_fetch()
is not present in the above mentionned file and in another project, same server, it gives me the error.
I've looked around composer.json
and they are the same.
I have installed pecl install apc
but it doesn't solve the problem.
So... As I don't really understand differences between APC and APCu and neither OPCache, if you have "spare time" to give me a little bit of explanation, and/or where to search, it will be greatly appreciated! As when I move to production server, I always receive this, even when calling Console Command from crontab that don't call cache clearing.
from cache.
from cache.
Argh... I have tried this but not looked at the error message.
pecl/apcu requires PHP (version >= 7.0.0-dev), installed version is 5.6.29
No valid packages found
install failed
So the problem is on my server... Thanks for your answer!
from cache.
So, the problem was on my server, it has been updated and then downgraded to php 5.6 without noticing me... But as clearing the cache doesn't work without apcu installed, I think it's better to prevent the user so I will try to work on a PR, as suggested, to do so. Just need to check a bit.
from cache.
Handled in #225
from cache.
Related Issues (20)
- CI doesn't have PHP 7.3 in the matrix HOT 2
- Support RedisCluster? HOT 3
- mkdir is affected by default `umask()` setting HOT 1
- Suggestion: Refactor code to replace the name "cache" as a directory name HOT 1
- compression? HOT 1
- Sunsetting doctrine/cache HOT 15
- Lazy Redis connection HOT 2
- The typehint for the CacheAdapter constructor is wrong HOT 2
- Is there a docs for v2? HOT 2
- Cache namespace from Setup::createCacheConfiguration gets lost
- Crash in Doctrine/ORM/Tools/Setup/createCacheInstance() after composer update HOT 4
- Performance degradation due to subsequent commit of deferredItems in PSR6 CacheAdapter HOT 8
- 1.12.1 and PHP7 breaking compatibility HOT 16
- Required PHP Version is Incorrect HOT 4
- PHP语法报错 HOT 1
- mark doctrine/cache as abandoned on packagist? HOT 1
- SonarQube Blocker Bug HOT 6
- Not working with symfony/cache v 6.1.1 HOT 10
- Release v3 as a bridge to Laminas or Symfony Cache HOT 6
- Incorrect "mixed" type hint in TypedCacheItem HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cache.