Discover Centmin Mod today
Register Now

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

    4,733
    1,144
    113
    May 25, 2014
    Ratings:
    +1,709
    Local Time:
    2:03 AM
    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

    4,733
    1,144
    113
    May 25, 2014
    Ratings:
    +1,709
    Local Time:
    2:03 AM
    Mainline
    10.2
    Cause, on php-error.log.
    I got 1 warning about it, but only logged once.
     
  3. eva2000

    eva2000 Administrator Staff Member

    42,337
    9,558
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,729
    Local Time:
    4:03 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
  4. rdan

    rdan Well-Known Member

    4,733
    1,144
    113
    May 25, 2014
    Ratings:
    +1,709
    Local Time:
    2:03 AM
    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

    42,337
    9,558
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,729
    Local Time:
    4:03 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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

    4,733
    1,144
    113
    May 25, 2014
    Ratings:
    +1,709
    Local Time:
    2:03 AM
    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

    4,733
    1,144
    113
    May 25, 2014
    Ratings:
    +1,709
    Local Time:
    2:03 AM
    Mainline
    10.2
    For my xenforo forum, I can see xf_session items.
     
  8. eva2000

    eva2000 Administrator Staff Member

    42,337
    9,558
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,729
    Local Time:
    4:03 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    variables -> slab id and go through them to find php like session names
     
  9. rdan

    rdan Well-Known Member

    4,733
    1,144
    113
    May 25, 2014
    Ratings:
    +1,709
    Local Time:
    2:03 AM
    Mainline
    10.2
    Maybe this?
    memc.sess.key.xxxxx
     
  10. eva2000

    eva2000 Administrator Staff Member

    42,337
    9,558
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,729
    Local Time:
    4:03 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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

    4,733
    1,144
    113
    May 25, 2014
    Ratings:
    +1,709
    Local Time:
    2:03 AM
    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

    42,337
    9,558
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,729
    Local Time:
    4:03 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    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."
     
    • Like Like x 1