• Ran the auto upgrade, all appeared to work fine. Site is up and running. When I go to the admin panel, I get the ‘Update WordPress Database’ button. Never completes the update.
    I assume the SQL doing the update is designed for MySQL and isn’t being translated correctly to MS SQL.
    Anyone managed to get past this point?

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter AndrewMBaines

    (@andrewmbaines)

    Hopefully, this will help someone.
    I was upgrading from 4.2 to 4.2.1 (if you’re doing anything else, look away!)
    I looked through the changes and the only change to the database to upgrade from 4.2 was to truncate any long comments. As I don’t have any, I wasn’t too worried.
    In SQL Server Management Studio, I ran:
    update wp_options set option_value = ‘31533’ where option_name = ‘db_version’
    This just tells WP that the database has been upgraded. All works fine now.

    Thread Starter AndrewMBaines

    (@andrewmbaines)

    Ah well, didn’t go so well. After logging out, I could no longer log back in again.
    In fact, I’ve now tried to recreate the whole site in 4.2.1. When creating the site, there’s a long list of errors, then it fails!

    Thanks for the great tip on setting the database version, but I also cannot login.
    I am considering migrating everything back to My SQL, which is a shame as I like MS SQL better than My SQL for ease of creating and configuring databases

    Thread Starter AndrewMBaines

    (@andrewmbaines)

    Sadly, the change to the database just allows the site to run again. Login breaks badly.
    I’ve had to move everything to an Azure VM with the MySQL database.
    Must admit, using SQL Server was a bit of a pain as some plugins didn’t work either. Some really bad code in WP and plugins if the application is this dependent upon the underlying database.

    Looks like I’ll be doing the same. Looks like I’ll be doing a fresh install of 4.2.1 onto MySQL and importing the sites, then just fixing all the links.

    Well, Seems all SQL databases aren’t equal. I was playing around with a wordpress sites on my test server, and decided to trey and update one of the sites. BINGO, updated without a problem, wordpress and the database no errors

    update, well tried to login to the sites this morning, and login is broken

    For me, the problem started with WP 4.1.4.

    I was looking at the changes and it seems the get_col_length() function (wp-includes\wp-db.php) is where I am seeing the problem.

    There is a check here if this is a MySQL database, but since Azure / SQL is using the wp-db-abstraction plugin, the is_mysql variable is still set to null, and thus not skipping the code block following the MySQL check.

    I haven’t done a ton of WP programming to fully vet out all of the implications of my change, especially since this was likely added as part of XSS hardening, but the following code change in 2 places fixes my problem…

    FROM:

    if ( false === $this->is_mysql ) {
    	return false;
    }

    TO:

    if ( false === $this->is_mysql || empty( $this->is_mysql ) ) {
    	return false;
    }

    Of course this will likely break each time things are updated… But if someone more familiar with this code area can chime in, would definitely appreciate it.

    Hey RSkoon,
    Did this fix the unable to login problem. Can you confirm what file you made the changes in.
    Thanks

    Hey Christo…
    File name / details are in my post above, and yes, this does address the login problem for me.

    I haven’t been able to fully code review though to determine if there are unintended consequences.

    Thanks, I thought it was the file listed just wanted to confirm. I will try the mods to the fuel tonight and let you know how it goes ????

    Did it work for you?

    I searched everywhere in the file for the required text and could not find it????

    Gave up and moved everything back to MySQL

    This is frustrating. Frustrated that there is NOT a native gallery of WordPress that JUST WORKS with SQL Azure. Frustrated that I have to hack a plug-in to get it to work. Frustrated that I don’t understand all this stuff.

    Whenever I try to update my SQL Azure based site from 3.something to 4.2.2, I get stuck in an infinite loop of “Database Update Required”/”Update Complete” then get locked out. Only chance is to restore from backup.

    Anyone got this TOTALLY figured out yet?

    *ANY* help is appreciated!

    Although not a pre-packaged solution, the code fix that I mention above has resolved the problems for me in my SQL Azure WordPress environment

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Update to 4.2.1 on Azure with MS SQL Server’ is closed to new replies.