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
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.
The quesiton is tagged under
symfony
, so I assume that you installed a bundle. Was it leaseweb/memcache-bundle, or was some other?Try examinging your
vendor
directory and try to identify if you have any ofMemcached
related classes.If question to (1) is false, you may be missing some
psr-4
mappings. Try examining yourautoload.php
and look forMemcached
specific namespace.Do you actually have
php-memcached
php extension installed? Have you enabled it? Try runningphp -m
and look forphp-memcached
or something like that.Please provide more info and we might be able to narrow it down.
Hope this helps.
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.