We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36959
    • 22 Posts
    My MODX Revolution 2.1.3 has been running for almost a year without having any issue. This morning I logged into the manager interface and wanting to create a new document, then I discovered that my web server gives me this error:
    --------------------------------------------
    HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfil the request.
    --------------------------------------------

    I tested it a bit more and found any action related to the resources in the "Resources" tab in manager interface will cause the HTTP 500 error. I however still can edit the resources under "Elements" and "Files" tabs. The front end web functions appear to be still working, browsing to any web page is still fine.

    I have tried restarting both the MySQLD and HTTPD services but it didn't help.

    I have checked the core/cache/logs/error.log and couldn't find anything logged for this particular error. Checking the HTTPD log doesn't seem to be any helpful. And I don't know if MODX Revolution keeps any more logs.

    Therefore I need you guys help with troubleshooting this problem.

    Server info:

    • CentOS 5.2
    • PHP 5.3.6
    • MySQL 5.0.95

    Thanks in advance for you guys' assistance.

    Regards.
    Johnmen

    This question has been answered by johnmenz. See the first response.

      • 1343 ☆ A M B ☆
      • 2,213 Posts
      Hello,

      Typically a 500 error is caused by incorrect permissions on files/folders and/or invalid lines in the .htaccess file. Try renaming it to off.htaccess and see if that resolves the problem. If not check that the file/folder permissions are correct.
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 36959
        • 22 Posts
        Thanks mate, I am pretty sure there was no change to .htaccess file and the file system on the CentOS box, but I will check on them just in case.

        BTW, do you know if PHP might keep some logs that I can have a look?

        Regards.
          • 1343 ☆ A M B ☆
          • 2,213 Posts
          I know you can typically find php errors listed in the cPanel Error Log, outside of cPanel it really depends on your system configuration.
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            There are a number of odd things going on lately; one of my clients just had her base path changed, and her hosting (Fat Cow, not my choice) swears up and down that they didn't change anything, but I had to reset the paths for the Manager file manager and the rich text editor/file browser. So just because the .htaccess hasn't changed doesn't mean a server configuration setting wasn't changed. So rename the .htaccess file anyway, to see if the 500 error goes away.
              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
              • 36959
              • 22 Posts
              Thanks Susan for the response. I actually made a bit more progress.

              First I use chown to make all the folders and files under the WWW root to be apache.apache, which is the user running the web server process. By the way the CentOS server is a server in my house, I have full control of it and no one else does.

              I found this from the ssl_errors.log:
              -------------------------------------------------

              [Fri Jul 06 16:32:43 2012] [error] [client 192.168.1.90] PHP Fatal error: Call to a member function addLexiconTopic() on a non-object in var/www/virtual/www.johnmen.com/core/cache/includes/elements/modplugin/1.include.cache.php on line 56, referer: https://www.johnmen.com/manager/
              --------------------------------------------------

              I am trying to work out what does that error mean. Appreciate if you guys have any idea.

              Regards.
                • 36959
                • 22 Posts
                I thought it was the outdated cache problem, I manually deleted everything inside the core/cache/ folder and restarted the Apache server, but the problem still persists. sad

                The only difference is that I don't get those ssl error anymore in the ssl_errors.log file.
                  • 3749
                  • 24,544 Posts
                  As Susan suggests, the first thing to try (after manually clearing the cache) is to turn off FURLs (in the DB system_settings table if necessary) and rename .htaccess. If the problem goes away, you know the problem is probably with the .htaccess file.

                  You can also see if anything here helps: http://bobsguides.com/modx-troubleshooting.html


                  ------------------------------------------------------------------------------------------
                  PLEASE, PLEASE specify the version of MODX you are using.
                  MODX info for everyone: http://bobsguides.com/modx.html
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 36959
                    • 22 Posts
                    Thanks Bob for the reply. My website doesn't have FURL enabled, I turned it off for quite a while now. I have tried renaming the .htaccess to .ht and restarted the HTTPD, again no difference made. Therefore the .htaccess is likely not be the cause.

                    I will have a look at your article for any hints.

                    Regards.
                      • 36959
                      • 22 Posts
                      Ok, I tried restoring the backup of the whole website including SQL database from the known working date and it still didn't fix the problem. Looks like the cause is outside of the modx website.