• Resolved alias3729

    (@alias3729)


    I am copying a WordPress installation from another server to our server.

    The Site on Our Server.

    This is a 2.7 installation using the FreshNews theme.

    I was getting some nasty errors for the widgets so I cleared out the widget_text in the database.

    Now I am getting the following error:

    Fatal error: Cannot unset string offsets in /home/dbqboard/public_html/wp-includes/widgets.php on line 621

    No matter what I do, this error won’t go away and the site won’t load.

    I have searched the forum for this error and must’ve tried everything that was suggested to fix this, including:
    modifying the .htaccess,
    turning magic_quotes off,
    removing the ‘utf8’ attribute from the wp-config.php file,
    setting ini flags in the wp-config.php file,
    all to no avail.

    I’ve even put phpinfo files on each server for comparison and found nothing that should prevent it from working. Unfortunately, tech support at our hosting provider won’t solve code-related issues.

    I’m at my wit’s end trying to figure this out…any ideas?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Try adding these to wp-config:

    ini_set('magic_quotes_gpc',0);
    ini_set('magic_quotes_runtime',0);
    Thread Starter alias3729

    (@alias3729)

    Thanks for the suggestion, but sorry, didn’t work…This was actually something I had tried earlier with no avail, but I did it again just in case I missed something the first time.

    Thread Starter alias3729

    (@alias3729)

    Bump!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    What kind of server is this out of curiosity? IIS or Apache or … ?

    Thread Starter alias3729

    (@alias3729)

    This is a Linux server running Apache 2 on CentOS.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    PHP version? (I’m grasping at straws, sorry, this is pretty rare πŸ™ )

    Thread Starter alias3729

    (@alias3729)

    5.2.11

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    I’m tapped πŸ™ All I can think is that it’s a server config error on the new server, but I can’t fathom what it might be.

    Thread Starter alias3729

    (@alias3729)

    I fixed it! Turns out the original DB was encoded in latin1_swedish_ci and the new DB was trying to use UTF8. I imported to the new server taking care to set the collation to latin1_swedish_ci, changed the wp-config accordingly, and all worked like magic. Imagine that…

    Moral of the story: When copying installations, note the original encoding/collation type.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    I suppose you could have converted the DB to UTF8 (which may not be a bad idea, all new WP installs use that since … 2.5? I think?)

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

The topic ‘“Cannot Unset String Offsets”, can’t view site or admin’ is closed to new replies.