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

    I am using an old version of Modx Revolution (1.0.4) and suddenly today my hosting company have upgraded their servers and am I now getting the error

    « MODx Parse Error »
    
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »
     
    PHP error debug
      Error:	mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead	 
      Error type/ Nr.:	 - 8192	 
      File:	/web2/user22089/website/manager/includes/extenders/dbapi.mysql.class.inc.php	 
      Line:	89	 
      Line 89 source:	 if (!$this->conn = ($persist ? mysql_pconnect($host, $uid, $pwd) : mysql_connect($host, $uid, $pwd, true))) {	 
    	 


    I am not an advanced user of Modx so any help is much appreciated. this is a business site and it has been down all day.

    Thank you!

    Lisa
      • 18608
      • 112 Posts
      Mathias Dannevang Reply #2, 12 years ago
      Hi Lisa,

      I think you are using modx evolution (based on the version number).

      Is it a possibility for you to update to the latest version: http://modx.com/download/evolution/ ?
        Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang
        • 35764
        • 35 Posts
        thank you for your reply. how is the best way to install an update without losing anything?

        thanks
          • 18608
          • 112 Posts
          Mathias Dannevang Reply #4, 12 years ago
            Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang
            • 35764
            • 35 Posts
            Quote from: MathiasD at Sep 27, 2014, 11:31 AM
            There is a guide here: http://rtfm.modx.com/evolution/1.0/administration/upgrading

            I've been told its because i need to use SQli or PDO so dont know if an upgrade will resolve the issue
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              That is an old version of Evolution. You will need to upgrade to Evolution 1.0.15 (I believe that's the latest version at this time). You cannot upgrade to Revolution (2.2 or 2.3). If I understand correctly, this issue was corrected as of Evo 1.0.12.

                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
                • 14214
                • 299 Posts
                For a temporary fix, do you have a control panel that allows you to run an old version of php?
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  You can actually go to the offending files and simply change all of the mysql_ to mysqli_, I did that a couple of times a few years ago when this first began to show up.
                    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
                    • 35764
                    • 35 Posts
                    Thank you everyone for your help.

                    I've tried going into the file mentioned in the error and changing MySQL_ to MySQLi_ but no success. I'm guessing other files are affected sad
                      • 35764
                      • 35 Posts
                      I can still access the Modx manager, that seems unaffected. The error I get is from http://www.brexworthyfarm.net.

                      Because I'm not really familiar with PHP I'm not really sure what and where I should be making changes.