skip to Main Content

EDIT:
perhaps I could make this simpler: when my website is running on php-5.2, everything works. When i try to run it on php-5.6 I get this error:
```sh

The installed libraries are all the same:

RUN 
  apt-get install -y 
    php5-memcache 
    memcached 
    libapache2-mod-php5

any ideas?


Note* I have tried installing php5-memcached, and this is what happens next.


After installing php5-memcache,

I get this warning message:

Message: Memcached::__construct() expects parameter 1 to be string, array given

Then the page break with a Fatal Error:

Fatal error: Call to a member function get() on null in  auth_model.php on line 800 E_ERROR Error in file  auth_model.php

This may be the breaking code ( auth_model.php on line 800):

    $memcached_profile=$this->memcached->get($memcached_key);

But it seems more like its memcache that’s not working

These are the versions:
Current PHP version: 5.6.40-0+deb8u4
Current CodeIgniter version: 2.0.2
Memcache version: 1.4.21

>php -i | grep memcache  
libmemcached version => 1.0.18

by the way, it makes no difference whether the memcached service is started or not!

2

Answers


  1. MemCached constructor optional parameter must be a string, and not an array

    /* For Creating a persistent instance */
    $m2 = new Memcached('story_pool');
    

    You should find out where your memcache persistent id is defined

    Login or Signup to reply.
  2. You have installed the memcache extension, but your application is attempting to use the Memcached class, which is defined by the memcached extension.

    The memcache and memcached extensions are similar, but not identical, and not interchangeable. Of the two, memcache (the one you have installed) is unmaintained and incompatible with current versions of PHP, so you should install the memcached extension (which your application expects to have available).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search