Drupal - Fatal Error: Class 'Memcache' Not Found

I installed drupal on my localhost. It worked well 2 months ago, but now something happened and I don’t know why. I would really appreciate it if you can help me. Thanks in advance.

The full error looks like this:

Fatal error: Class 'Memcache' not found in /srv/www/htdocs/modules/memcache/dmemcache.inc on line 177

1) php -m gives the following:

[PHP Modules]
BZ2
CType
Date
House
Filter
GD Iconv
hash JSON LibXML MBstring Mcrypt MySQL MySQLi PCRE PDO PDO_MySQL Pdo_Sqlite SimpleXML SPL reflection session SQLite standard sysvsem tokenizer xml xmlreader xmlwriter zip zlib











[Zend Modules] off

2) memcached is installed through the package manager.

3) memcache module for installed drupal

what am I doing wrong? THX

+3
source share
6 answers

Thanks so much for your answers - I ended up dealing with this problem. Here's the solution for both openSUSE 11.1.

  • memcache php:

    #if apt-get, rpm, or yum doesn't work
    cd /usr/src/
    wget http://pecl.php.net/get/memcache-2.2.5.tgz
    tar -zxvf memcache-2.2.5.tgz
    cd memcache-2.2.5
    phpize5
    ./configure --enable-memcache
    make
    make install
    cp modules/memcache.so /usr/lib/php5/extensions/
    
    # Note: packaged extension modules are now loaded via the .ini files
    # found in the directory /etc/php5/conf.d/
    touch /etc/php5/conf.d/memcache.ini
    echo 'extension=memcache.so' > /etc/php5/conf.d/memcache.ini
    

    apache2

  • memcached daemon php .

  • memcache drupal ( : http://drupal.org/project/memcache)

UPD. PHP: - . - " install -f pecl/memcache" :)

+1

googletorp, , , memcache. :

#if apt-get, rpm, or yum doesn't work
cd /usr/src/
wget http://pecl.php.net/get/memcache-2.2.4.tgz
tar -zxvf memcached-2.2.4.tgz
cd memcached-2.2.4
phpize && ./configure --enable-memcache && make
cp modules/memcache.so /usr/lib/php/modules/

# Note: packaged extension modules are now loaded via the .ini files
# found in the directory /etc/php.d
touch /etc/php.d/memcached.ini
echo 'extension=memcache.so' > /etc/php.d/memcached.ini

service httpd restart

memecache . 11.12.09.

+4

, Drupal Drush ( ), MAMP.

Try:

echo $PHPRC

, ~/.profile * ~/.bash_profile *:

export PHPRC='/Library/Application Support/appsolute/MAMP PRO/conf/php.ini'
+2

, mempache drupal , inc.

  • drupal?
  • que drupal.org.

, drupal, . , .

EDIT:
, iphone, . , Drupal Memcache. .

2. memcache PECL PHP. 2.2.1     .

, - . Drupal Memcache, , .

0

extension=memcached.so php.ini. , phpinfo();

apache.

0

, memecache , PHP memecache.

0

Source: https://habr.com/ru/post/1725654/


All Articles