Home  >  Q&A  >  body text

php - 求教:Fatal error: Class 'Memcache' not found in...

1.Fatal error: Class 'Memcache' not found in F:PHPhtdocsedscwLibInit.php on line 5;

Line 5: $memcache = new Memcache;

The memcache extension has also been installed in 2.php.ini, as follows:

extension=php_memcache.dll
[Memcache]  
    memcache.allow_failover = 1  
    memcache.max_failover_attempts=20  
    memcache.chunk_size =8192  
    memcache.default_port = 11211 ;        

3. Check from the task manager that memcached is running;

4. Printing phpinfo() does not show any information about memcache.

What is the reason for this error?

某草草某草草2716 days ago1140

reply all(4)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-06-06 09:56:06

    Restart the web server.
    For example, restart apache, restart nginx, restart php-fpm.

    reply
    0
  • 某草草

    某草草2017-06-06 09:56:06

    1. Type the command line to see if Memcache is really available
    2. Check the code

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-06-06 09:56:06

    After installation, restart php and check if there is memcache extension in phpinfo()

    reply
    0
  • 黄舟

    黄舟2017-06-06 09:56:06

    The corresponding version is wrong, right? http://windows.php.net/downlo...

    reply
    0
  • Cancelreply