From f5f8e54d6bce28a11c5c4c359b72a4ab455261d2 Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst <thijs@kinkhorst.com> Date: Thu, 3 Aug 2017 05:45:19 +0000 Subject: [PATCH] Reapply changes from de972b674829d24ee6767d2b8fe0be99e686ef0d that were lost in a merge error. Also tweak wording of artifact idp docs a bit re memcache extension. --- bin/memcacheSync.php | 10 +++++----- docs/simplesamlphp-artifact-idp.md | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bin/memcacheSync.php b/bin/memcacheSync.php index 3aa432e8f..64605a952 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 41108ec67..4db281c49 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. -- GitLab