fideloper / Implementing-Laravel

Companion application to the e-book Implementing Laravel
173 stars 40 forks source link

FatalErrorException - Class 'Memcached' not found #6

Closed wmlockhart closed 11 years ago

wmlockhart commented 11 years ago

Hi Chris,

I have purchased and just finished reading your book. It's excellent - Thanks.

I really like the way you structure the sample application and I'm very keen to use your approach in an upcoming application of my own.

I downloaded the most recent release of the same application from GitHub - and I followed the instructions on installing the application. We I ran the sample application I got the error message 'FatalErrorException - Class 'Memcached' not found' which occured at line 40 in 'vendor\laravel\framework\src\Illuminate\Cache\MemcachedConnector.php'

My development environment is XAMPP running on Windows 7, so I followed the instructions here: http://www.leonardaustin.com/t... to install memcached on XAMPP running Windows 7. The installation appears to be working well with no errors when running the test code provided by the author of the article.

However, after restarting my development environment I still get the error message 'FatalErrorException - Class 'Memcached' not found' when I try to run your sample application.

Am I missing some specific configuration of memcached required for Laravel 4 or your sample application?

I have successfully developed and ran Laravel 4 applications on my development machine previously, although not with memcached.

Any help would be greatly appreciated as I am keen to explore your sample application further and learn more.

Thanks in advance.

Kind Regards

Walter

fideloper commented 11 years ago

Hello!

Sorry to hear that! That sounds frustrating.

I have very little experience developing on Windows, but it does sound like your issue may be one of the following:

  1. Memcahced wasn't installed in your machine successfully (The link you provided didn't work, I'm guessing it's this one?)
  2. More likely: You still need to enable Memcached in PHP. Perhaps you need to restart XAMPP still? (You need to restart Apache in XAMPP after changing the php.ini file for it to take effect)

Note that the instructions followed (assuming the link I found is correct) actually have you enable the PHP Memcached client before installing it. Apache needs restarting after editing php.ini AND after the Memcached PHP client is installed.

bionicmaster commented 10 years ago

I did it found out exactly what's happening, actually that's because in windows the class that is implemented for use Memcached is Memcache (that actually connects to Memcached if it's enabled) and doesn't use (even doesn't exist PECL Memcached) then it's not possible to use it in windows.

wpjCode commented 6 years ago

Your mean is:Windows System can‘t use the PHP memcached class??