• When my host automatically updated my site to 4.9.2 I got dowzens of PHP error messages about my custom theme, all along the lines of mysql_query isn’t going to work.

    I got my hosts to revert the site to 4.9.1 and everything went back to normal but they’ve told me I will need to get my theme fixed because sooner or later WordPress will have to be upgraded. Sure.

    I’ve reached my level of understanding about this stuff tbh. Could anyone please advise about how much work it would be to get a theme that crashes with 4.9.2 because of mysql_* calls fixed. There are over 200 mysql_query statements in the theme alone.

    How would I start? Any pointers would be very gratefully received.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    So your theme is doing it’s own queries and not using the WP sql interface. Hmmm…. not really good coding there. Have you contacted the theme’s developer?

    What is at least of of those error messages? The exact text, please.

    Thread Starter surenuffnyesido

    (@surenuffnyesido)

    Yeah – it’s a theme I purchased the license for several years ago now – I would very much doubt the developer would be interested tbh

    Here’s the first error message:

    Warning: mysql_query(): Access denied for user ‘xxxx’@’localhost’ (using password: NO) in/home/website/public_html/wordpress/wp-content/themes/TheClothesShop/lib/engine/update_carts.php on line 33

    How difficult would it be to plug it in to the WP sql interface?

    Thanks for your help.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    >> Access denied <<

    Does the theme have it’s own userid/password saved — apart from the one in wp-config.php?

    Do you know it really is a theme issue? Does the site work on 4.9.2 if you use twentyseventeen as the theme?

    As it’s a custom theme and you haven’t contacted the dev, there’s not a whole lot we can offer here to provide specific help. I think contacting the dev is still the best bet. They may offer to fix it — or at least you’ll know you may need to hire another dev to fix this for you.

    Thread Starter surenuffnyesido

    (@surenuffnyesido)

    No – the theme works fine on 4.9.1 and the website works fine with 4.9.2 using WordPress themes. I can’t use those themes for my shop though.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Two choices: fix your theme or find another. Staying on 4.9.1 is not a safe option.

    Thread Starter surenuffnyesido

    (@surenuffnyesido)

    I’ve tried using this in wp-config:

    //Allow mysql_* on PHP 5.5 +
    //Usage: put this code into your wp-config.php file
    #######################################
    define(“WP_USE_EXT_MYSQL”, true);

    but that hasn’t seemed to work either.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    That’s no the issue, You need to use mysqli_ calls, not mysql_. See https://stackoverflow.com/questions/26476162/can-i-blindly-replace-all-mysql-functions-with-mysqli

    If you can muddle through that, it will probably help. Basically, the code in your current theme has reached its end-of-life.

    Thread Starter surenuffnyesido

    (@surenuffnyesido)

    Much appreciated – I’ll give that a read tomorrow – yay! won’t that be fun.

    Thread Starter surenuffnyesido

    (@surenuffnyesido)

    FYI: I’ve emailed the theme developer srhnbr @ themeforest.net and will update as and when.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘4.9.2 Breaks Custom Theme’ is closed to new replies.