diff --git a/bin/memcacheSync.php b/bin/memcacheSync.php index 3aa432e8fef295d9019b10cbad52caf65cc98833..64605a952aa94ff89d4e9a57e4ba36df16149cd9 100755 --- a/bin/memcacheSync.php +++ b/bin/memcacheSync.php @@ -4,15 +4,15 @@ // Check that the memcache library is enabled if(!class_exists('Memcache') && !class_exists('Memcached')) { - echo("Error: the memcache and memcached libraries appear to be unavailable.\n"); + echo("Error: the memcached (or memcache) PHP extension appears to be unavailable.\n"); echo("\n"); echo("This is most likely because PHP doesn't load it for the command line\n"); - echo("version. You probably need to enable one of them somehow.\n"); + echo("version. You probably need to enable it somehow.\n"); echo("\n"); - if(is_dir('/etc/php5/cli/conf.d')) { + if(is_executable('/usr/sbin/phpenmod')) { echo("It is possible that running one of the following commands as root will fix it:\n"); - echo(" echo 'extension=memcache.so' >/etc/php5/cli/conf.d/memcache.ini\n"); - echo(" echo 'extension=memcached.so' >/etc/php5/cli/conf.d/memcached.ini\n"); + echo(" phpenmod -s cli memcached\n"); + echo(" phpenmod -s cli memcache\n"); } exit(1); diff --git a/docs/simplesamlphp-artifact-idp.md b/docs/simplesamlphp-artifact-idp.md index 41108ec672c2e76b6a651b4879a1daebb7bd334f..4db281c494f8559efe058dfda9560b4cf6fb2aab 100644 --- a/docs/simplesamlphp-artifact-idp.md +++ b/docs/simplesamlphp-artifact-idp.md @@ -12,17 +12,17 @@ Memcache -------- To enable memcache, you must first install and configure memcache on the server hosting your IdP. -You need both a memcache server and a the PHP memcache client. +You need both a memcache server and a the PHP memcached client (extension). + How this is done depends on the distribution. -If you are running Debian Lenny, you can install both by running one of the following: +If you are running Debian or Ubuntu, you can install this by running: - aptitude install memcached php5-memcache - aptitude install memcached php5-memcached + apt install memcached php-memcached -The memcached extension should be used for PHP 7. +simpleSAMLphp also supports the legacy `php-memcache` (without `d`) variant. *Note*: For security, you must make sure that the memcache server is inaccessible to other hosts. -The default configuration on Debian Lenny is for the memcache server to be accessible to only the local host. +The default configuration on Debian is for the memcache server to be accessible to only the local host. Once the memcache server is configured, you can configure simplesamlphp to use it to store sessions.