Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class 'Memcached' not found #69

Closed
Gummibeer opened this issue May 24, 2016 · 2 comments
Closed

Class 'Memcached' not found #69

Gummibeer opened this issue May 24, 2016 · 2 comments

Comments

@Gummibeer
Copy link
Contributor

Script php artisan clear-compiled handling the post-install-cmd event returned with an error

[RuntimeException]
Error Output: PHP Fatal error: Uncaught Error: Class 'Memcached' not found in /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php:51

Stack trace:
#0 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php(20): Illuminate\Cache\MemcachedConnector->getMemcached()
#1 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(164): Illuminate\Cache\MemcachedConnector->connect(Array)
#2 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(102): Illuminate\Cache\CacheManager->createMemcachedDriver(Array)
#3 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(77): Illuminate\Cache\CacheManager->resolve('memcached')
#4 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(55): Illuminate\Cache\CacheManager->get('memcached')
#5 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(66): Illuminate\Cache\CacheManager->store('memcached')
#6 /var/www/laravel/vendo in /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php on line 51

PHP Fatal error: Uncaught Error: Class 'Memcached' not found in /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php:51
Stack trace:
#0 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php(20): Illuminate\Cache\MemcachedConnector->getMemcached()
#1 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(164): Illuminate\Cache\MemcachedConnector->connect(Array)
#2 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(102): Illuminate\Cache\CacheManager->createMemcachedDriver(Array)
#3 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(77): Illuminate\Cache\CacheManager->resolve('memcached')
#4 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(55): Illuminate\Cache\CacheManager->get('memcached')
#5 /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php(66): Illuminate\Cache\CacheManager->store('memcached')
#6 /var/www/laravel/vendo in /var/www/laravel/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php on line 51

This error occurs when I connect to the workspace and run any kind of artisan command. Even if I not use memcached as the cache driver. :/

Solution was to require php7.0-memcached in the workspace Dockerfile. In my opinion it isn't good to have two configurations of php for the same application. Is there any solution to use the php-cli from the php-fpm container? Or have an extra php-cli container to know that there are these two different containers and the structure of both is the same?

@Mahmoudz
Copy link
Member

@Gummibeer that's because we are missing the installation of memcached in the workspace container (PHP-CLI). If you like you can add it and create a PR. Also you can check the PHP-CLI dockerfiles where we have it installed.

Mahmoudz added a commit that referenced this issue May 24, 2016
@Mahmoudz
Copy link
Member

Closed by #70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants