We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19309
    • 49 Posts
    I know, this topic has been discussed already. My problem is: None of the provided solutions works in my case. So I dare to post it again.


    The situation:

    I want to create a development copy of an existing website which I made with MODX 2.1.5. I need the copy to test if I can upgrade this website to MODX 2.2 without worries. And I need it to play around with some TVs and template changes I don’t want to try on the live website.

    The copy is placed in another directory on the same server as the original website. I followed the instructions in the documentation, i.e. disabled FURLs, copied all files, copied the database, changed all paths in the config files and the database and re-run the setup script. Everything is double checked and OK. I checked the frontend, and everything looks good.


    The problem:

    Every time I try to log in to the backend, the login-page loads again instead of the Manager interface. No error message shows up, it’s just the login screen again and again.

    Using password recovery seems to work, since I received the e-mail with activation link and new password. But with the new password I still see the login screen again and again.


    What I already checked and tried:

    I tried all the solutions I could find, since this problem is not new. But unfortunately nothing works. It can’t be any PHP configuration problem, since both websites are on the same server and use the exact same PHP installation. APC and eAccelerator are not active anyway. I can’t see any suspicious entries in the errorlog.

    In addition to this I tried to make a copy of this website in a local XAMPP environment. Same thing here: The frontend works fine, but I can’t get into the backend. I even tried upgrading the MODX installation of the local copy to MODX 2.2. But it didn’t help. The frontend worked fine again, but I still couldn’t log in.


    I’m at my wit’s end. The database cannot really be the problem. The PHP configuration cannot really be the problem. So it must be somewhere in the files. But the files are definitely an exact copy of the original site.

    If any one has any ideas what I might have overlooked, I’d be really glad.

    Thank you very much!
    Michael

    This question has been answered by markh. See the first response.

      • 33974
      • 156 Posts
      Is there any console output in your browser's console?
        • 13218
        • 134 Posts
        Hi Michael,
        you didn't mention the cache - did you clear the cache before copying the site?
        If not, you can try to just delete all files in your core->cache directory.
        Could help, maybe not.
        +m
          @itWilllBeOK
          • 19309
          • 49 Posts
          Nothing special. There is the same 301 redirect from …/manager/ to …/manager/ after sending the login. But the original website ends up with the manager interface, the copy only shows the login screen again.
            • 19309
            • 49 Posts
            @itWillBeOk Yes, I cleared the cache, cleared all sessions and deleted everything in the core/cache directory before copying files and database.
            • Sounds like it either cannot store the session in the database (meaning db details are off), or it does create the record but it can't set the session ID for your user, which could be an issue with the cookie path.

              Can you email me the links and a valid login ([email protected]) to see if I can replicate and/or fix the issue?
                Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • Admittedly I know relatively nothing about MODX, but the last time I saw that recurring login screen with forgot password functionality, it was due to permissions that were set upon install. What you describe is exactly the run-around I saw before I fixed the permissions.

                This was for new users only. The original admin and generated password worked fine.

                  Frogabog- MODX Websites in Portland Oregon
                  "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                  Having server issues? These guys have MODX Hosting perfected - SkyToaster
                • discuss.answer
                  Thanks for trusting me with your login details Michael.

                  Is your original site (or at least the manager) served over SSL?

                  When logging in it would try to set a cookie using the setcookie header, which head the "secure" keyword, indicating that the cookie should only be available when SSL is used. This is controlled by the session_cookie_secure system setting which was set to true.

                  Unfortunately the dev domain you linked me to was not served over SSL, so when it had instructed the browser to set the session cookie and redirect to the manager, it wouldn't have access to the cookie anymore.. cause it's not ssl. Makes sense right?

                  I've changed the session_cookie_secure setting to false (0) via the database and cleared the cache and can now succesfully login.
                    Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                    Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                    • 19309
                    • 49 Posts
                    Thanks so much, Mark. You are right, the original site is completely served over SSL. I found one of the settings in the database, wich said anything with “https“ and changed this to “http“. But I didn’t know that there are different cookie setting for SSL and normal connections.
                      • 38728
                      • 1 Posts
                      Same here, but I don't use https. How you're solved this?