2.14.18.1. Configuring Memcache in SMF

To fix the error after connecting Memcache:

2: memcache_connect () expects parameter 2 to be long, string given File: / home / name_user/name_site / www / Sources / Load.php Line: 2742
  1. Open the file /Sources/Load.php and find the line in it:
    $memcached = memcache_connect($server[0], empty($server[1]) ? 11211 : $server[1]);
  2. Replace the found line with this one:
    $memcached = memcache_connect('unix:///home/example/.system/memcache/socket', 0);

    Instead example substitute hosting account namein which the site is hosted.

  3. In the same file, find the line:
    $memcached = memcache_pconnect($server[0], empty($server[1]) ? 11211 : $server[1]);
  4. Replace the found line with this one:
    $memcached = memcache_pconnect('unix:///home/example/.system/memcache/socket', 0);

    Instead example substitute hosting account namein which the site is hosted.

  5. Save your changes.
  6. Check the site is working.

Settings in the site admin panel are not required.

Content