Forums

[resolved] "Cannot Unset String Offsets", can't view site or admin (11 posts)

  1. alias3729
    Member
    Posted 2 years ago #

    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?

  2. Try adding these to wp-config:

    ini_set('magic_quotes_gpc',0);
    ini_set('magic_quotes_runtime',0);
  3. alias3729
    Member
    Posted 2 years ago #

    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.

  4. alias3729
    Member
    Posted 2 years ago #

    Bump!

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

  6. alias3729
    Member
    Posted 2 years ago #

    This is a Linux server running Apache 2 on CentOS.

  7. PHP version? (I'm grasping at straws, sorry, this is pretty rare :( )

  8. alias3729
    Member
    Posted 2 years ago #

    5.2.11

  9. 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.

  10. alias3729
    Member
    Posted 2 years ago #

    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.

  11. 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?)

Topic Closed

This topic has been closed to new replies.

About this Topic