We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38357
    • 178 Posts
    I have posted on this issue before but it persists with no solution, so I thought I would approach it from a different direction.

    I have severe problems with my Modx Revolution site. The same symptoms existed with v2.2.4-pl and continue after upgrading to 2.2.6-pl

    This is long-winded I know but I am trying to provide as much info as possible – getting desperate.

    The problems only exist with the Manager interface– the front end of the site operates as expected.
    I have tried turning off all plugins with no change in behavior.
    The site is hosted on a shared server and errors indicate that the problem is caused by a server configuration issue but I don't know where to look. Each browser I use reacts differently as below, but all browsers exhibit the same errors from time to time - this is typical but is not always the same for each browser:

    Chromium: (Running on Kubuntu Linux)

    Shows Dashboard but no left column with Resources/Elements/Files and Undefined at the top. Shows distorted Home page overlaid with Error at the top, Unexpected token <:
    and an OK button at the bottom. Clicking OK closes the home page.

    Click Security>Manage Users Page reloads and shows the dostorted Home page again. Close this. Menu and Submenus visible but cannot be activated.


    Firefox: (Running on Kubuntu Linux)
    Opens Dashboard. Overlaid with Error box:

    syntax error:
    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Left column showing but no tree under resources. Clicking Elemnts Tab shows elements tree but same error box as above. Click Files tab and tree is shown OK with no error. Go back to Resources Tab – still empty

    Click Security>Manage Users. Page reloads and shows error box as above. Left Menu shows and Resources are now displayed correctly. Clicking Elemnts Tab shows elements tree but same error box as above. Click Files tab and tree is shown OK with no error. Go back to Resources Tab and still displays correctly

    Internet Explorer 10: (Running on Windows 7 in VM – similar results on separate box running WindowsXP/IE8)
    Logs on correctly – Tabs in left column work OK.

    Click Security>Manage Users Select a user, click Update User. Page loads distorted Home page with images missing. Click the OK button and correct editing page is shown but there is no menu at the top. Clicking Back in the browser bring up the Syntax Error window and usenames are not displayed.

    ModX Error Log shows:
    [2013-03-28 21:42:41] (ERROR in xPDOConnection::connect @ /home/qpgccom/public_html/core/xpdo/xpdo.class.php : 2999) SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'sending authentication information', system error: 32
    [2013-03-28 21:42:42] (ERROR @ /index.php) Error preparing statement for query: SELECT `modSession`.`id` AS `modSession_id`, `modSession`.`access` AS `modSession_access`, `modSession`.`data` AS `modSession_data` FROM `qpgc_session` AS `modSession` WHERE `modSession`.`id` = ? - Array
    (
    [0] => 00000
    )

    ….............................................................
    CPANEL shows the following:

    Resource Usage Overview
    Your site has been limited within the past 24 hours
    CPU resources were limited for your site
    Memory resources were limited for your site
    Every time there is an error the 1Gb memory linit on the server is exceeded:

    Server Error log:
    Typical entries – often repeated many times:
    [Fri Mar 29 08:41:17 2013] [error] [client 203.123.90.130] (12)Cannot allocate memory: couldn't create child process: /opt/suphp/sbin/suphp for /home/qpgccom/public_html/manager/min/index.php, referer: http://www.qpgc.com.au/manager/?a=57
    [Fri Mar 29 08:38:35 2013] [error] [client 203.123.90.130] (12)Cannot allocate memory: couldn't create child process: /opt/suphp/sbin/suphp for /home/qpgccom/public_html/index.php, referer: http://www.qpgc.com.au/manager/?a=48
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      It sounds like your site has simply outgrown its hosting server capacity. How many resources to you have? Have you tried turning off css and js compression in System Settings?
        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
        • 38357
        • 178 Posts
        Thanks Susan,
        The site has about 80 resources and around 250 registered users. Heaps of disc space. It's not a large site and only has about 100 visitors per day on average. I wouldn't have thought this would stretch the server at all?
        If I turn off css and javascript compression things seem to improve a little but instead of:

        syntax error:
        Internal Server Error

        in the Error box

        I get:

        Unexpected token <:
        Internal Server Error
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          I was thinking about what it takes to generate the Manager pages, like the Resource Tree. But that shouldn't be a problem.

          It could be your file system permissions. Sometimes if a folder, such as assets or assets/components is set to 777 and the server expects them all to be 755 you'll get similar errors.
            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
            • 38357
            • 178 Posts
            Thanks again Susan,
            I checked permissions and all are set to 755
              • 35150 ☆ A M B ☆
              • 191 Posts
              I bet your problem's with SuPHP. If you can, copy your site over to a server which uses FCGI as the PHP handler and see how it the manager runs; I imagine that'll fix things.
              I ran into this problem once installing a site on liquidweb shared hosting. They moved the account over to one of their servers running FCGI instead of SuPHP and that completely fixed it. Talk to your hoster and see if they can do anything for you. The MODX manager isn't going to run properly on that server configuration. If it used to work fine there, ask if they switched PHP handlers at the time you began noticing problems.
                Extras :: pThumb • Resizer • imageSlim • setPlaceholders
                • 38357
                • 178 Posts
                Thanks jgrant,
                That's very interesting. I noted that the server errors all showed suPhp in the url but I don't know enough about that to have made any real connection. I am unable to swap servers so need to find a work-around if I can, in some way, definatively identify where the problem lies - any suggestions anyone?

                Is this an issue for ModX? Should it be able to run on a server which uses suPhp? There was no indication during setup that this was a problem - the server ticked all the boxes for comapatibility.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  It's most likely a badly configured suPHP installation.

                  If the suphp.log gets too big it will cause these errors. I would suspect that on a site under development that would be likely, especially if the suPHP configuration is for loglevel=info which is the default.


                    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
                    • 35150 ☆ A M B ☆
                    • 191 Posts
                    Quote from: bobd72 at Mar 30, 2013, 01:32 AM
                    I am unable to swap servers so need to find a work-around if I can, in some way, definatively identify where the problem lies - any suggestions anyone?

                    Can you switch PHP handlers then? If you're on a VPS or dedicated server you can likely configure this through cPanel. If it's shared hosting your options are probably pretty limited, but some hosts do provide a option (usually between mod_php and fcgi).
                    If you can get in touch with a knowledgeable sysadmin where you're hosting the site, they ought to be able to help you out. I'd say it's a server compatibility issue and finding some MODX setting which fixes everything is unlikely. According to the minimum requirements, you need FastCGI: http://develop.modx.com/develop/revolution/requirements/

                    Though I admit I'm far from being an expert on this. My one experience with a similar problem was that the installation went fine but the Manager was broken—similar to your description—and switching handlers from SuPHP to FCGI fixed it. In my case it was a complete change of server, but I think just changing the handler should have done it. [ed. note: jgrant last edited this post 13 years, 6 months ago.]
                      Extras :: pThumb • Resizer • imageSlim • setPlaceholders
                      • 35150 ☆ A M B ☆
                      • 191 Posts
                      Oh, if you're not super familiar with PHP handlers, I've found this article provides a useful and understandable overview: http://boomshadow.net/tech/php-handlers/
                        Extras :: pThumb • Resizer • imageSlim • setPlaceholders