1

During an automatic upgrade to 4.2.2 I am getting a blank screen on upgrading the database and the following error in the php.log:

[Mon Jun 29 08:48:10 2015] [error] [client 127.12.209.129] PHP Fatal error:  
Call to undefined method wpdb::get_col_length() in 
/var/lib/openshift/site/app-root/runtime/repo/php/wp-admin/includes/upgrade.php 
on line 1461, 
referer: http://example.com/wp-admin/upgrade.php?_wp_http_referer=%2Fwp-admin%2F

The public front of the site works fine but I cannot login to the admin area without it trying to run the database upgrade and giving me a blank screen.

Trying a manual upgrade does not fix the problem. Things are stuck in a loop trying to upgrade the database and not being able to find wpdb::get_col_length() in the functions included into the upgrade code.

0

I checked in mysql and the type of the column it was looking for is text and in version 5.1 of MySQL that I am using the size is 65,535 so I replaced line 1461 which was giving error with the following hardcoded size:

        $content_length = array(
                        'type'   => 'byte',
                        'length' => 65535,
                );

After that the upgrade completed fine and the site is healthy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.