We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10702
    • 107 Posts
    We have the problem that phpsessid is added very often to the url (for example: http://www.domainxyz1234.com/file.html?PHPSESSID=fcd1ls1t2dem2ii1bmo2e4tp27) (maybe it appears always on the first visit on our site).

    Could this be a problem of CHMOD = MODx needs more rights?

    We gave alle folders by default CHMOD=755 and all files 644. Beside this: We set CHMOD=775 to all folders and subfolders of Core/Cache (without the included files which still remain on 644). And also 775 to the three folders: /assets/ assets/components/ und core/components/ (without included files which still remain on 644).

    We also have problems of database-connection which seems to be very "fragile"/inconstant.

    Does anybody has an idea which folders and files need more rights maybe especially rights of writing?

    It would be great if anybody could help. Thanks in advance!
    Gerdi smiley
      • 22303 MODX Staff
      • 10,725 Posts
      This probably means your php session configuration is not set to use cookies, and thus has to try to send the session id in the URL.
        • 10702
        • 107 Posts
        Thank you very much. This sounds plausible.

        Do you also know how I can set php session configuration to use cookies?

        Gerdi smiley
          • 22303 MODX Staff
          • 10,725 Posts
            • 10702
            • 107 Posts
            Thanks a lot. Meanwhile we did some tests which maybe indicate that the problem is the .htaccess / how MODx performs the rewrite.

            We put a file including this code once in the modx-folder and once in none-modx-folder

            <?
            phpinfo();
            ?>

            The output of the file in the modx-folder contains additional lines at different places:

            containing HTTP_COOKIE PHPSESSID=7sdfasdfsf...

            This means it is not a problem of the server or php.ini

            It must be based somewhere in MODx

            Maybe we have to give more writing-right with CHMOD to certain folders or files to not force MODx to deliver the session id in the URL? What do you think?

            Gerdi smiley
              • 22303 MODX Staff
              • 10,725 Posts
              Sorry, but we run MODx on a variety of environments and never see this; it must be your session configuration. If you think it’s an .htaccess directive, get rid of it.
                • 10702
                • 107 Posts
                Quote from: OpenGeek at Oct 28, 2010, 05:04 PM

                Sorry, but we run MODx on a variety of environments and never see this;
                Look at this topic. They seem to have similar problems:
                http://modxcms.com/forums/index.php/topic,50780.msg295319.html#msg295319

                Hope anybody has an idea what we could try to solve the problem!
                Gerdi smiley
                  • 10702
                  • 107 Posts
                  For all who have similar problems: We switched "php_session_use_trans_sid" in the configuration of our server (not by .htaccess) to "off". And now we have no problems anymore. Hope this helps others experiencing the same problem, too.

                  Thanks to OpenGeek who pointed us to the solution of this annoying problem...

                  Thanks again!
                  Gerdi
                    • 14437
                    • 31 Posts
                    I can't change php settings with my webhost.
                    They told me to put this in the index.php file:

                    ini_set('session.use_only_cookies', true);
                    ini_set('session.use_trans_sid', false);

                    Any thoughts?