• Upgrade has disabled the admin of my blog

    Blog still loads, but admin gives this error:

    CGI Error

    The specified CGI application misbehaved by not returning a complete set of HTTP headers.

    The upgrade.php file gives this error:

    WordPress database error Unknown system variable ‘NAMES’ for query SET NAMES ‘utf8’ made by require, require_once, require_once, require_wp_db, require_once WordPress database error You have an error in your SQL syntax.

    MySQL version is Client API version 5.0.22

    What’s the problem?

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter dlature

    (@dlature)

    thanks for the post, though…I have a request into my host to upgrade to 4.1 or above

    Thread Starter dlature

    (@dlature)

    Yep, went back to the 2.8.6 files when I couldn’t get upgrade to finish. Thanks. Maybe my host will upgrade.

    hormigacapoeira

    (@hormigacapoeira)

    upgrading from 2.6.2 to 2.9.2

    on database all words were cutted off at the firts spanish char .

    examples : ‘María’ ended up ‘Mar’, ‘cantarán’ ended up ‘cantar’

    db charsert is utf8

    I have backed up 2.6.2 db that has a lot of entries.

    any suggestion on how to get my db upgraded keeping the spanish chars ?

    hormigacapoeira

    (@hormigacapoeira)

    Found a solution :

    replace all spanish chars to entities on your db and then /wp-admin/upgrade.php.

    <?php
    
    $file = file_get_contents('db_old.sql');
    
    $file = handleSpanishCharacters($file);
    
    $result = file_put_contents("db_modified.sql", $file);
    if (!$result) {
      echo 'no se ha podido generar el archivo';
    }else{
      echo 'se ha generado el archivo portado exitosamente';
    }
    
    function handleSpanishCharacters($input){
    
        $translate = array();
        $translate['á'] = "Á";
        $translate['é'] = "É";
        $translate['í'] = "Í";
        $translate['ó'] = "Ó";
        $translate['ú'] = "Ú";
        $translate['?'] = "Ñ";
        $translate['ü'] = "Ü";
        $translate['á'] = "á";
        $translate['é'] = "í";
        $translate['í'] = "é";
        $translate['ó'] = "ó";
        $translate['ú'] = "ú";
        $translate['?'] = "ñ";
        $translate['ü'] = "ü";
        $translate['?'] = "¿";
        $translate['?'] = "¡";
        $translate['?'] = "«";
        $translate['?'] = "»";
        $translate['€'] = "€";
    
        $search = array_keys($translate);
    
        $replace = array_values($translate);
    
        return str_replace($search,$replace,$input);
    
    }
    
    ?>
    hormigacapoeira

    (@hormigacapoeira)

    You might get warnings when you activate permalinks after replacing chars for html entities. Disabling warnings on wp-config fixed that issue

    @ini_set('log_errors','On');
    @ini_set('display_errors','Off');
    @ini_set('error_log','/home/example.com/logs/php_error.log');
    /* That's all, stop editing! Happy blogging. */
Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Upgrade to 2.9 from 2.8.6 fails’ is closed to new replies.