开发者

Class 'Memcache' not found in

Moved to the site hosting from Network Solutions, the error o开发者_JAVA技巧ccurred

Fatal error: Class 'Memcache' not found in / data / ... / include / connect.inc on line 6

How can I fix it? I created a php.ini file in the folder cgi bin, added there the line extension = "memcache.so". But apparently the module itself is not on the server. What should I do? Hosted by usual, is not VPS.

Sorry for my English :)


I would use the phpinfo() output to identify where the php.ini file is and whether the Memcache module is loaded.

If the server is not managed by you then you might have problems getting this PECL module installed.


Please use php -m | grep memcached to check whether memcached.so is loaded successfully. - If show memcached, this mean it succeeded. - Else it is not loaded Or check phpinfo, see whether there is a Memcached SectionL like this

Class 'Memcache' not found in

if php -m | grep memcached shows:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/memcached.so' - /usr/lib64/php/modules/memcached.so: undefined symbol: php_json_decode_ex in Unknown on line 0

Here is the solusion: e.g your php.ini is /etc/php.ini, your php.d is /etc/php.d/

Solution 1

  1. comment 'memcached.so' in php.ini
  2. vim /etc/php.d/memcached.ini
  3. add extension=memcached.so in /memcached.ini
  4. php -m | grep memcached check whether memcached is succeed loaded

Solution 2

  1. rm /etc/php.d/json.ini
  2. add extension=json.so in php.in before extension=memcached.so
  3. php -m | grep memcached check whether memcached is succeed loaded
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜