We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43957
    • 79 Posts
    I've done a foolish thing.

    I have a Modx 2.2.6pl site which has been up for months.

    I was running PHP5.2 on my hosted server and thought it a good idea to update to PHP Version 5.3.24.

    Now I'm presented with 500 Error Site temporarily unavailable and I can't access the manager, getting the same error.

    I've tried changing back to 5.2, but it's not propogated yet, so I don't know if this will work.

    I'm not in a good way and would really appriciate some help getting my site back.
      • 43957
      • 79 Posts
      I did try uploading and re-running setup in "advanced upgrade mode", but it couldn't find the database. I checked the config.inc.php and realise that the charset is blank.

      $database_connection_charset = '';


      I tried chaning this to

      $database_connection_charset = 'utf8';


      but it didn't show anything when trying to connect. I'm guessing that the charset should not be blank?

      My server has reverted now back to PHP Version 5.2.17 and my site is back up.

      However, I'd like to upgrade my php version to 5.3. Anyone know if there's a recommended process to do this, so I don't end up in the same mess described above? [ed. note: dave-b last edited this post 13 years, 3 months ago.]
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        What did the php error log have to say? The apache error log might have something useful as well. Most likely the PHP update had some default php.ini settings that were causing problems.

        Were you able to run any .php files with the PHP update? It may have had nothing at all to do with MODx.
          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
          • 43957
          • 79 Posts
          Hi sottwell,

          I only tried running phpinfo to see the reported PHP version, which worked.

          <?php
          phpinfo();


          Not sure off hand about the error logs, will have to go and rummage.

          I wasn't expecting MODX to fall over. Should changing the PHP version not normally cause any issues in MODX?

          Thank for you help.
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            If you had a custom snippet or plugin, or any other PHP code that is incompatible with the newer version, it could cause a problem. But if that is the case, your error logs should show the problem. You could also check the /core/cache/logs folder to see what the MODx error log has.
              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
              • 43957
              • 79 Posts
              I'm not getting anything other than the default 500 internal server error page. So it's not getting far enough to process anything else, I guess.
                • 3749
                • 24,544 Posts
                Does PhpInfo show that MySQL and the PDO extensions are OK?

                Are the database credentials correct in config.inc.php?

                Anything useful in the server's error log?

                  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