• [Solved] Manager Login/Session problems on shared/cloud/grid servers#

  • brandsavvy Reply #1, 2 years, 9 months ago

    Reply
    I have several sites installed in The RackSpace Cloud Mosso and it seems that the new instances are running a different version (or configuration) of PHP. On all new instances the MODx manager login will not work. Basically, it immediately returns you to the login form once processed.

    Info on PHP for the instance that works: http://www.schuylkillhealth.com.php5-2.dfw1-1.websitetestlink.com/info.php
    Info on PHP for the instance that DOES NOT work: http://www.haselden.com.php5-3.dfw1-1.websitetestlink.com/info.php
    modxCMS - 0.9.6.3
    RedHat Linux

    Apache - 2.2
    PHP - 5.2.6
    MySQL - 5.1.11

    Any help is much appreciated.


  • rthrash Reply #2, 2 years, 9 months ago

    Reply
    Looks like they're both running PHP 5.2.6. PHP 5.3 is still in RC status so I can't see Mosso deploying that in production beyond limited testing yet.


  • brandsavvy Reply #3, 2 years, 9 months ago

    Reply
    Ryan, yes I see that. I got confused about the Mosso naming convention on the new instances: "HTTP_X_MOSSO_DT PHP5-3" versus the instances that do work that say: "HTTP_X_MOSSO_DT PHP5-2 ".

    I did notice that the variable configurations are not the same. Do you think that just a PHP configuration change could cause this issue?


  • brandsavvy Reply #4, 2 years, 9 months ago

    Reply
    OK, my problem is solved. Here is the deal:

    Evidentially, by default the servers store all sessions in a /tmp/ directory and that can cause an issue depending on how the server is configured. This /tmp/ directory is shared by all websites on the cloud. By changing where the session goes, it pulls the session away from the file system garbage collecting.

    There are two lines that need to be added to the .htaccess file that do two things:

    1. Saves our sessions into a directory in our structure
    2. Extends the session time longer


    # Write the sessions into a directory specific to the server instance
    php_value session.save_path /mnt/stor2-wc1-dfw1/396360/398509/www.haselden.com/web/content/sessions/
    php_value session.gc_maxlifetime 28800

    Implementing this solution solved my issue.


  • rthrash Reply #5, 2 years, 9 months ago

    Reply
    That's great information. I think I'll rename and sticky this topic in the thread for future reference for others. Thanks for doing the research brandsavvy.


  • codedoc Reply #6, 2 years, 9 months ago

    Reply
    Thanks Guys! Was having the same problem and pulling my hair out. All is good now.


  • sbRyGuy Reply #7, 2 years, 5 months ago

    Reply
    THANK YOU!!!!

    I was trying to get this issue working after reading this page:

    http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
    What I was doing was not using the full server path of my site. My manager kept logging me out and it was driving me nuts. This seemed to have solved it. Question though; do we need to change the folder permissions whatever directory we use for sessions?

    Just curious here. Again this post kept me from pulling the few remaining head hairs I have!


  • brandsavvy Reply #8, 2 years, 5 months ago

    Reply
    It may not be necessary but it doesn't hurt to add read/write access to the sessions folder.


  • ewilkes Reply #9, 2 years, 4 months ago

    Reply
    I'm having the same issue (when trying to login it says "...is currently editing these settings. Please wait until the other user has finished and try again."

    I have made the changes to the ht.access file and continue to get the message. Is there something that I'm doing incorrectly?

    Here's what I added:

    # Write the sessions into a directory specific to the server instance
    php_value session.save_path /home/domainName/public_html/assets/sessions/
    php_value session.gc_maxlifetime 28800

    thanks for any help!


  • sharkbait Reply #10, 2 years, 4 months ago

    Reply
    I have made the changes to the ht.access
    did you rename ht.access to .htaccess? otherwise it won't work
    http://modxcms.com/forums/index.php?topic=28454.0