We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36776
    • 31 Posts
    Ok, but if we go back to my first post: How do i configure MODX to use/allow the other session?
    Because the script works fine outside MODX. It is only when using it in modx it fails.

    We also use the CMS e107 on the old site, there the script also works fine..
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: tropicaljuice at May 09, 2012, 02:17 PM
      Ok, but if we go back to my first post: How do i configure MODX to use/allow the other session?
      Because the script works fine outside MODX. It is only when using it in modx it fails.

      We also use the CMS e107 on the old site, there the script also works fine..
      That completely depends on how the other application starts the session. Most likely, you will need to set the session_handler_class to blank (to use the PHP session handler configured in your php.ini), and potentially the session_cookie_path, session_name, session_cookie_domain, etc. Inspect the session cookies set by the application you are integrating to see what it uses for these values.
        • 36776
        • 31 Posts
        Quote from: opengeek at May 09, 2012, 02:24 PM
        That completely depends on how the other application starts the session. Most likely, you will need to set the session_handler_class to blank (to use the PHP session handler configured in your php.ini), and potentially the session_cookie_path, session_name, session_cookie_domain, etc. Inspect the session cookies set by the application you are integrating to see what it uses for these values.

        Ok, but I have tried setting the session_handler_class to blank, but WHMCS's session is still not available within MODX.
        As previously stated, WHMCS is crypted, and I have no access to its scripts, so I have no idea what i can put in the other fields.
        But session_cookie_domain and the others shouldn't be necessary, as MODX is in the exact same folder, domain and database as WHMCS.

        Do you guys have any more ideas? Or have I found the one thing MODX cant do?
          • 22303 MODX Staff
          • 10,725 Posts
          I suggest logging in to each system after clearing all cookies for the domain and inspecting the cookies set by each to see what the details are. This is the only way to diagnose the issue you are having.
            • 36776
            • 31 Posts
            Ok, here is the result:

            First time entering MODX after clearing all cookies:
            "uid=de3ae536f10ac4180611992a66c7b302"

            First time entering WHMCS directly after clearing all cookies:
            "PHPSESSID=2044c66a0fdfd3e24a19598b97adbd2d; uid=18210e7efef4639d1c5739dfad3f1960"

            First time entering MODX after clearing all cookies and logging in to WHMCS which forward til clientarea.php:
            Before logging in:
            "uid=45e5e903af4f02d260911d13a9e6a8f9"
            
            After logging in (remember the login form forwards to clientarea.php (whmcs)):
            "uid=45e5e903af4f02d260911d13a9e6a8f9; PHPSESSID=3636f628ba89fda149bb4b596c695b75"
            
            Then going back to MODX:
            "uid=45e5e903af4f02d260911d13a9e6a8f9; PHPSESSID=3636f628ba89fda149bb4b596c695b75"
              • 36776
              • 31 Posts
              Sorry for bumping this thread, but is there anyone out there who know what we can do, so that our WHMCS sessions is visible thru modx?

              EDIT:
              Visible/Usable
                • 18373 ☆ A M B ☆
                • 3,141 Posts
                Be prepared to be locked out, but can you set the session_cookie_name system setting to "uid" to match what WHMCS uses? I think that (and the blank session handler) should work to use the same sessions in PHP.
                  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.
                  • 36776
                  • 31 Posts
                  Quote from: markh at May 22, 2012, 05:16 AM
                  Be prepared to be locked out, but can you set the session_cookie_name system setting to "uid" to match what WHMCS uses? I think that (and the blank session handler) should work to use the same sessions in PHP.

                  Thanks, I can try this. But then i need to create the setting, right?
                  If so, is this correct?:
                  Key: session_cookie_name
                  Name: Session Cookie Name
                  Description:
                  Area Lexicon Entry: session
                  Value: uid


                  EDIT:
                  I tried creating the setting above, and set session_handler_class to empty, then deleting cache. Still not working.. Maybe I'ts not possible and I should give up :-P [ed. note: tropicaljuice last edited this post 14 years, 4 months ago.]
                    • 18373 ☆ A M B ☆
                    • 3,141 Posts
                    That setting should've existed already..

                    It definitely should be possible, it's just finding the right mix. tongue
                      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.
                      • 40144
                      • 2 Posts
                      anyone could make this work?
                      (ie... on a modx site, be able to show a ajax login form or at least the name if the uses is logged on the system).

                      I'm building my new site on Modx, and I use whmcs as the billing.
                      I know I can "copy" the header/footer and put on the whmcs, to make whmcs look like the website.
                      BUT... It would be really nice to be able to make the user login on any page and show his name ... (and for example, be able to carry the order along all the site.... if for example, the user goes from the whmcs order page, to say... modx contact page... have a "cart" link where the order is still there.

                      Also would be nice to be able to get other data from WHMCS as well to populate some pages in modx.

                      Anyone have done this already and have some examples?
                        ___________________
                        www.cascompany.net :: Dedicated & Shared Hosting