We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

2.13.10.5.1. Setting up 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.