Giter Club home page Giter Club logo

Comments (14)

Ocramius avatar Ocramius commented on June 27, 2024 1

@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.

Ocramius avatar Ocramius commented on June 27, 2024 1

from cache.

Ocramius avatar Ocramius commented on June 27, 2024

from cache.

LaurentMarquet avatar LaurentMarquet commented on June 27, 2024

Thanks for your answer but can you explain a little bit more what should be done?

from cache.

lcobucci avatar lcobucci commented on June 27, 2024

@Laurent3170 you should make sure that the mentioned extension is installed on your environment.

from cache.

Ocramius avatar Ocramius commented on June 27, 2024

Closing as invalid

from cache.

LaurentMarquet avatar LaurentMarquet commented on June 27, 2024

@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.

Ocramius avatar Ocramius commented on June 27, 2024

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.

LaurentMarquet avatar LaurentMarquet commented on June 27, 2024

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.

LaurentMarquet avatar LaurentMarquet commented on June 27, 2024

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.

Ocramius avatar Ocramius commented on June 27, 2024

from cache.

LaurentMarquet avatar LaurentMarquet commented on June 27, 2024

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.

LaurentMarquet avatar LaurentMarquet commented on June 27, 2024

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.

Ocramius avatar Ocramius commented on June 27, 2024

Handled in #225

from cache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.