Join the community today
Become a Member

PHP-FPM Use external node memcaced server as PHP session.save_handler?

Discussion in 'Centmin Mod Insights' started by rdan, Jun 16, 2015.

  1. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    9:57 PM
    Mainline
    10.2
    I have this on my custom php.ini
    How can I verify it works as expected? :/

     
  2. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    9:57 PM
    Mainline
    10.2
    Cause, on php-error.log.
    I got 1 warning about it, but only logged once.
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,811
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    11:57 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    9:57 PM
    Mainline
    10.2
    I check it now using the php file.
    But I also use it on my xenforo forum config.
    I know it works on my xenforo, but not totally sure if it's use by PHP session.save_handler.
     
  5. eva2000

    eva2000 Administrator Staff Member

    55,811
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    11:57 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    edit server's memcache.php file to change 127.0.0.1 to remote private ip so you can check
     
  6. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    9:57 PM
    Mainline
    10.2
    Yes I already did that.
    How to verify?
    What should be the name of the keys?
     
  7. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    9:57 PM
    Mainline
    10.2
    For my xenforo forum, I can see xf_session items.
     
  8. eva2000

    eva2000 Administrator Staff Member

    55,811
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    11:57 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    variables -> slab id and go through them to find php like session names
     
  9. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    9:57 PM
    Mainline
    10.2
    Maybe this?
    memc.sess.key.xxxxx
     
  10. eva2000

    eva2000 Administrator Staff Member

    55,811
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    11:57 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    easiest way is temp close forums, restart php and memcached and visit forums.. then check slab ids as there would be less to look for
     
  11. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    9:57 PM
    Mainline
    10.2
    This is the only key prefix I'm seeing and my xenforo.
    Maybe it works or else, I can't login to WP sites hosted on this server.
     
  12. eva2000

    eva2000 Administrator Staff Member

    55,811
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    11:57 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yeah that's it PHP: Runtime Configuration - Manual

    Code:
    memcached.sess_prefix    memc.sess.key.
    Code:
    memcached.sess_prefix string
    Memcached session key prefix. Valid values are strings less than 219 bytes long. The default value is "memc.sess.key."