We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7974
    • 8 Posts
    I just changed to a server running PHP 5.0.4 and MySQL 4.1.18 from a PHP 4.4 and MySQL 4.1.18. MODx ran with out problems on the php4 server but is having a problem with sessions on the php5 server. After looking in the forums the sugestions were to make sure that the trans_id was set to "0" and that the save_path was good. Both of these are good. I can even look at the session file and read and write to the dir via ssh. Another suggestion was to modify a function with the save_path, but that function no longer exists in the MODx script.

    I got the install script to work by placing session_write_close(); right after $_SESSION[’session_test’] = 1; in the // session loop-back tester, of the install index.html. This showed the "OK" on the checking sessions and allowed the install to continue. However, this obviously didn’t fix the whole problem. The sessions still have the same problem as shown by the fact that the login screen just refreshes and goes nowhere upon login.

    // session loop-back tester
    if(!$_SESSION[’session_test’] && $_GET[’s’]!=’set’) {
    $_SESSION[’session_test’] = 1;
    session_write_close(); // < - This is the line I inserted to make the install work

    I found many people saying using this will make sure sessions are written prior to the page refresh.

    After googling I found some people claiming that PHP 5.0.4 has problems with sessions. Is this true?
    I also found a solution to set register_long_arrays = On, but this did not work either.

    Has anyone else had these session problems on PHP5? Even if not please let me know. I am trying to narrow down the solution.

    Thank you, If you need more information let me know.
      • 22303 MODX Staff
      • 10,725 Posts
      I run on all flavors of PHP 5 without this issue. However, I have run into similar issues before, but it seems like this was on older versions of MODx. If I can find previous references to it or recall exactly what it was, I’ll post back, but thanks for the information on how you did get it working.
        • 25663 MODX Staff
        • 12,272 Posts
        I run 5.0.4 without issue (albeit a custom compile).
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 7974
          • 8 Posts
          I got it working. Finally! My php.ini had to be fully configured. The good part is I know sessions inside and out now and have a good grasping start on the inner workings of MODx. BTW, MODx works with
          session.use_trans_sid = 1

          just fine. This setting is actually more secure and is the default compiled in php since 4.2.0.

          The best CMS is hardly the words. I’ve looked high and low and none follow standards as well as MODx. I was in the middle of writing my own when I found MODx by accident looking for more efficent ways to create rounded corners. I haven’t sunk my teeth into it all the way yet but I can tell that I like it enought to use and what I need I will just make mods for.

          Thanks to all the current and previous developers.

          P.S. If anyone now or in the future has problems with sessions, just reply to this post (I’m subscribed) and I will help you out.
            • 7923
            • 4,213 Posts
            Quote from: DragonWize at Jun 16, 2006, 11:48 PM

            ... I found MODx by accident looking for more efficent ways to create rounded corners ...
            Haha! Just remembered that I found MODx the same way! grin altought I was using Etomite at the time, I didn’t knew about MODx until I stubled upon Ryans blog article about rounded corners (the world filtering at etomite forums had worked pretty good on me, I guess).. Immediately went to test it out at opensourcecms.com from there and rest is history.. smiley

            Good to have you aboard DragonWize, I bet you will have good times with MODx and this community. There’s lot to expect from the future of MODx too (*hint to Jason* when are we going to see the MODx-1.0-roadmap-planned-features-etc-ect-post?? wink)


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              I had been playing with CSS and the "ThrashBox" for a couple of years when I started looking around for a CMS that would let me modify it for a mulitlanguage site and had web user login capablities. Etomite had the simple heirarchical structure that I could use, and when I spotted Ryan’s connection to Etomite vis-a-vis the MODx mods that provided the front-end user adminstration that I needed at that time, it clinched the deal. So you may hate the name, Ryan, but it’s served its purpose!
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 36862
                • 5 Posts
                Just got my server setup and went to install. Now I'm getting the same errors. Any ideas? I've tried the session setting in php.ini and disabling suphp.. no luck.
                  Disclaimer: This post is considered AS IS without any warranty, and no guarantees that it will be helpful in any way. If bad things happen because you read this post you take full responsibility for your actions. If anything on this post causes confusion, ignore the entire post.