• Morning,
    We have a wordpress site version 5.0.3 and I tried upgrading php to version 7.2.14 from 7.2.2 and it failed epically. My developer tells me there is no reason that it should have failed but here we are. He insists its one of the plug ins but doesn’t know which one. Is there any way to narrow it down?

    It said: Fatl error: uncaught error: call to undefined function mysql_connect() in D:\wwwroot\wp-includes\wp-db.php:1562 stack track: #0 D:\wwwroot\wp-includes\load.php(409): wpdb->_construct(wp_dbuser, …..

    And a bunch more but I just have an image of the error not the text so forgive any spelling errors.

    Any ideas would be great.

    Thanks

    Laura

Viewing 7 replies - 1 through 7 (of 7 total)
  • PHP version is managed by your host. Please ask your hosting service for support upgrading PHP version.

    Moderator t-p

    (@t-p)

    He insists its one of the plug ins but doesn’t know which one. Is there any way to narrow it down?

    Try:

    – deactivate ALL pluguns.
    – Update php
    – if success, activate plugins one by one to find the culprit.

    Quick fix if it’s a plugin issue is to rename the plugins directory by adding 1234 to the directory name. FTP or your Control Panel’s File Manager will get you there.

    That will kill all the plugins. If the site comes back up then you know it was one of those plugins. You can go through and rename all but one of the individual plugin’s directories the same way and rename the main plugins directory back.

    If the site stays up you can then rename back the next plugin and then the next testing each time until you get a failure. As you rename the individual plugins back take a look to see if they are still active and activate the inactives as you go or after you finish restoring the individuals.

    You might instead install the Health Check plugin and use it to diagnose the problem after you get the first plugin back. But the above-outlined method is the one I’d use as if you can’t get things to run with the plugins then you probably can’t install the Health Check plugin anyway.

    https://www.ads-software.com/plugins/health-check/

    If the site still doesn’t run after killing off the plugins then you might have a theme issue. The recommended method is to make sure one of the default ‘Twenty’ series themes are installed (I like Twenty thirteen or Twenty Seventeen for this process). The site should run now or else you have a hosting or WordPress Core issue. The theme’s functions.php file is the usual culprit if the theme caused the problem.

    I’ve run into a few instances where the PHP version acted up but reverting back to 5.6 usually allowed everything to run again and an upgrade to a slightly different 7.X version (if available) usually cured that problem. You do want to run PHP 7.X if possible as that is about 2 times faster than 5.6.

    • This reply was modified 6 years, 2 months ago by JNashHawkins.
    Thread Starter lmayer1875

    (@lmayer1875)

    Thanks for that! We are hosted in house and I am the PHP upgrade support for this.

    I’ll give that a shot.

    Thanks again,

    Laura

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    @lmayer1875 While all the above is useful advice, the correct answer is more likely that you updated PHP, but did not activate the PHP mysqli extension. I don’t know what particular setup you’re using, but since you appear to be on Windows, find the PHP.INI file, edit it, and uncomment the extension=php_mysqli.dll line.

    Thread Starter lmayer1875

    (@lmayer1875)

    Thanks Sam. I created a clone of the production webserver and tried again, same story. I tried renamed the plugins directory, checked if extension=php_mysqli.dll was enabled. and none of it helped. It seems to be failing on the wp-db.php file.

    if ( WP_DEBUG ) {
    $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
    } else {
    $this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
    }

    Is this something I should change to test?

    Thanks

    Laura

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘can’t upgrade to php 7.2.14’ is closed to new replies.