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
- Open the file
/Sources/Load.php
and find the line in it:$memcached = memcache_connect($server[0], empty($server[1]) ? 11211 : $server[1]);
- 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. - In the same file, find the line:
$memcached = memcache_pconnect($server[0], empty($server[1]) ? 11211 : $server[1]);
- 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. - Save your changes.
- Check the site is working.
Settings in the site admin panel are not required.