We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16449
    • 6 Posts
    Hi,

    I’ve just installed modx revolution (2.0.0 pl) on a shared windows hosting environment. The installation was successful and the DB tables have been created. But when I try to login to the manager section, I get "Recursion too deep; the stack overflowed" displayed on the web page in Firefox and Chrome. IE displays a 500 "Internal Server Error" notification.

    If I enter a wrong password or user name, I get the error messages and stay on the login screen. The IIS transfer log just shows a 500 status against the request for the manager/index.php URL.

    I have tried googling as well as contacting my host to check if there are any permission issues, but turned up blank.

    Could any of you please point me in the right direction in resolving this issue?

    Thanks
    -Kumar S
      • 22303 MODX Staff
      • 10,725 Posts
      Can you provide details about the "shared windows hosting environment" so we can better assist?
        • 16449
        • 6 Posts
        Hi Jason,

        This is a Windows hosting plan from Jodohost.

        IIS 6.0
        PHP 5.2.5
        Mysql 5.0.67

        Do you need any other specific information? You can take a look at the phpinfo at the following URL.

        http://clients.obound.com/umoldit/phpinfo.php

        -Kumar
          • 16449
          • 6 Posts
          I stumbled on another facet to this issue.

          The above error occurs if I type .../manager/ in the browser and attempt to login. But when I type .../manager/index.php in the browser and attempt to login, I get the following 502 error.

          <<<<
          CGI Error

          The specified CGI application misbehaved by not returning a complete set of HTTP headers.
          >>>>

          I see this error being discussed in this board before but without any resolution in a shared hosting scenario.

          Could any of you point me in the right direction as to what I should ask my host to configure? I checked if it could be a php dll permission issue by creating a sample pdo query php file. I did a post into this php file and ran a PDO Mysql query based the posted value. This was successful. So FastCGI does seem to have permission to access these dll files.

          Any input from people who have already faced this issue?

          -Kumar
            • 16449
            • 6 Posts
            Hi

            Done a bit more checking on this. I’ve set the log level to debug and now I find that these lines are being logged repeatedly for each login attempt.


            [2010-09-28 10:15:57] (DEBUG @ /manager/index.php) System event OnInitCulture was executed but does not exist.
            [2010-09-28 10:15:57] (DEBUG @ /manager/index.php) System event OnBeforeManagerLogin was executed but does not exist.
            [2010-09-28 10:15:57] (DEBUG @ /manager/index.php) System event OnManagerAuthentication was executed but does not exist.
            [2010-09-28 10:15:57] (INFO @ /manager/index.php) Removed modSession instance with primary key e9d2716a1e8d876ef406d5e44fd4370c
            [2010-09-28 10:15:57] (DEBUG @ /manager/index.php) System event OnManagerLogin was executed but does not exist.
            [2010-09-28 10:15:57] (INFO @ /manager/index.php) There was an error retrieving or creating session id: e9d2716a1e8d876ef406d5e44fd4370c
            [2010-09-28 10:15:57] (DEBUG @ /manager/index.php) System event OnInitCulture was executed but does not exist.
            [2010-09-28 10:15:57] (DEBUG @ /manager/index.php) System event OnBeforeManagerLogin was executed but does not exist.
            [2010-09-28 10:15:57] (DEBUG @ /manager/index.php) System event OnManagerAuthentication was executed but does not exist.
            [2010-09-28 10:15:57] (INFO @ /manager/index.php) There was an error retrieving or creating session id: e9d2716a1e8d876ef406d5e44fd4370c
            [2010-09-28 10:15:57] (DEBUG @ /manager/index.php) System event OnManagerLogin was executed but does not exist.
            [2010-09-28 10:15:57] (INFO @ /manager/index.php) There was an error retrieving or creating session id: e9d2716a1e8d876ef406d5e44fd4370c

            I’m sure the experienced guys out here should be able to point me in the right direction. Why would these errors occur, and that too repeatedly for a single login request? After this I get the 502 CGI error on the browser.

            -Kumar
              • 22303 MODX Staff
              • 10,725 Posts
              There definitely appears to be a problem with your session, but I can’t be sure what it is. The only thing I see odd in phpinfo is the auto_prepend_file setting; it is set to C:\Program Files\HSphere\3rdparty\PHP\PHP5\prepend.php -- can you tell me what that file is/does?
                • 16449
                • 6 Posts
                I had a feeling that there was a problem wit a redirect as the error reported was about incomplete http headers. So I set the log level to LOG_LEVEL_DEBUG and tried to create some debug output. I changed the file core\model\modx\processors\security\login.php and inserted the following statement:

                $modX->log(modX::LOG_LEVEL_DEBUG,’Login forward to:’ . $response["url"] . ’:’);

                just before the last line listed below.

                return $modx->error->success(’’, $response);

                Now when I login, I get the php error listed below:

                Fatal error: Call to a member function log() on a non-object in XXX\core\model\modx\processors\security\login.php on line 178

                Surpisingly, now if I press F5 and reload the page, it goes right in to the manager interface. As far as I have checked, I do not get the CGI or recursion errors again.

                So it appears that what is required to get past the error is a pause after a valid login and before redirecting to the manager UI. The pause was provided by the php error generated to the browser.

                Can anyone throw some light on this please?

                -Kumar
                  • 22303 MODX Staff
                  • 10,725 Posts
                  Quote from: kumars at Oct 01, 2010, 01:32 AM

                  Can anyone throw some light on this please?
                  Certainly can’t reproduce that in any environment I am testing with. Did you find out what was in the auto-prepend file?
                    • 16449
                    • 6 Posts
                    Quote from: OpenGeek at Oct 01, 2010, 02:44 PM

                    Certainly can’t reproduce that in any environment I am testing with. Did you find out what was in the auto-prepend file?

                    The auto_prepend file is provided by my host for security reasons. However, I have over-ridden it with my php.ini configuration now. Still no change. I tried removing the log statement that causes an error and put in a usleep in that place. But that does not prevent the error. Can you give me some idea of where control flows after the core\model\modx\processors\security\login.php file. Also how do I write to the log from this file. I would like to explore this further to get to the root of this issue.

                    Thanks for your help in this smiley

                    -Kumar
                      • 22303 MODX Staff
                      • 10,725 Posts
                      The processor is called by AJAX, so you can use your browser developer tools to inspect the response to see what is happening. See calls to $modx->log() for writing information to the log file; you can always just do some var_dump()’s and die() to see what is happening. Though again, this is an AJAX request, so in order to see the response, you’ll need a tool for inspecting the AJAX response.