We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21974
    • 20 Posts
    My web host recently upgraded server OS to Ubuntu and my MODx Evo 1.0.13 sites are no longer functioning. The front end does not load at all, and when attempting to access the manager the following error is present:

    Fatal error: Call to undefined function mysql_connect() in /manager/includes/extenders/dbapi.mysql.class.inc.php on line 93

    I was advised that Ubuntu doesn't support php5.2 which is what these calls are referenced in, and that commenting out anything referencing the old php version in the .htaccess file might help, I am not at that level so I don't fully understand. If an app is written referencing a certain version of php...how can you possibly hack that up to work.

    Has anyone had this problem before? I'm wondering if upgrading to 1.0.14 would be the solution...
    • If the mysql_connect function is not available in PHP, it has to be PHP 5.6 (or PHP 5.5 with some strong restrictions). The mysql functions are deprecated in PHP 5.5 and removed in PHP 5.6. So please ask the web host to activate PHP 5.3/5.4 for that vhost (if possible).
      • Support for both PHP 5.2.x and 5.3.x has ended, so there is little surprise your host has upgrade. I'm a little surprised they have upgrade to 5.6.x from the sounds of it, as Jako noted there are some fairly major breaking changes.

        You should ask you host for PHP 5.4.x support at the least. If they aren't willing to offer a more mainstream version while most scripts catch up with the changes you might want to consider changing hosts.
          Patrick | Server Wrangler
          About Me: Website | TweetsMODX Hosting
          • 21974
          • 20 Posts
          Thanks for the insights. I actually grabbed a fresh copy of 1.0.14 to upgrade to, and it took care of it.

          I have been out of development for a few years so wasn't up to date on support for PHP. I actually think I was using outdated PHP in my .htaccess file based on the final response I got from my host's support before upgrading solved the issue completely. The site that was down was one I developed way back in 2010 and still utilized the original .htaccess file I had created back then despite updating MODx a few times since.

          "The issue was not that the install
          required the certain version of PHP, just that the version of php being
          used was not updated. Files such as php.ini, phprc, and .htaccess that
          all pointed to PHP pointed to the versions that they were originally
          created for. So, even when the version was changed in the panel, the
          files with custom settings still pointed at the old version, causing the
          issue. "
          • I'm glad to hear you got the problem resolved, thanks for posting back!
              Patrick | Server Wrangler
              About Me: Website | TweetsMODX Hosting