skip to Main Content

I have setup existing symfony project to my local machine(windows). After composer install i get a error like this .

ClassNotFoundException in Memcached.php line 6:

Attempted to load class "Memcached" from the global namespace.
Did you forget a "use" statement?

2

Answers


  1. Without detailed look into your configuration, I can only offer you a checklist with which you could give it a shot and see which part is missing.

    1. The quesiton is tagged under symfony, so I assume that you installed a bundle. Was it leaseweb/memcache-bundle, or was some other?

    2. Try examinging your vendor directory and try to identify if you have any of Memcached related classes.

    3. If question to (1) is false, you may be missing some psr-4 mappings. Try examining your autoload.php and look for Memcached specific namespace.

    4. Do you actually have php-memcached php extension installed? Have you enabled it? Try running php -m and look for php-memcached or something like that.

    Please provide more info and we might be able to narrow it down.

    Hope this helps.

    Login or Signup to reply.
  2. Download the php_memcached.dll from here and place it in the ext directory. If you are using a php version older than 7.3 also download the libmemcached.dll and place it in the php root directory. Don’t forget to enable extension from the php.ini file.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search