• Hello,

    I have a wordpress 2.0 blog that has been running fine, until recently I had to move the database to a new location on the same server. The old DB was was in a shared database, whereas the new one is the database installed on my dedicated server.

    What I did was dump a backup of the old DB (as the wordpress tables were among many other tables for the site), restore the DB in the new location, and change wp-config to connect to the new DB – only had to change DB_HOST to ‘localhost’.

    For the most part, the blog is intact, except for the error at the top which reads:

    Warning: Invalid argument supplied for foreach() in /wp-includes/capabilities.php on line 19

    Whats worse, the admin login has these errors:

    Warning: Invalid argument supplied for foreach() in /wp-includes/capabilities.php on line 19

    Warning: Cannot modify header information – headers already sent by (output started at /wp-includes/capabilities.php:19) in /wp-login.php on line 9

    This also prevents me from logging in to the admin.

    It’s clear that the problem is with capabilities.php but I’m not sure how or why since the file wasn’t touched. The wordpress files didn’t move or change except for wp-config.

    I’m an intermediate with PHP/MySQL. Any pointers or help would be appreciated

Viewing 2 replies - 16 through 17 (of 17 total)
  • Arrggggg! Beginning to wonder if this program works for “anybody”??? Sorry, feeling so discouraged, been trying to install wordpress all day today and getting the same kinds of errors described in this thread. Does anyone have this thing up and running, and if so, how did you do it, we’d all love to know!

    Well, other than the half-dozen people posting in this thread, it seems to work fine for most of us…. I run probably 30 installs, my own and clients’, and I’ve never seen this error – and I’ve probably done over a hundred installs and upgrades in the last two years, ditto on never seeing this error.

    lockwiz, is your situation a new install or an upgrade? If it’s a new install, please download the 2.0.5 distro fresh and uncompress to your hard drive. Then delete the entire file/folder set from your server space; drop the database from within phpMyAdmin.

    Then reupload the file/folder set from the new download. Go back to mysql/phpMyAdmin, create a new database and user, add the user to the database, edit and upload wp-config.php with that information, and try installing again. If it installs fine, that’s great; just keep in mind that to keep it from doing weird stuff,you’ll probably need the plugin from Mark Jaquith; thread here, and link to download: https://markjaquith.wordpress.com/2006/10/28/some-wordpress-205-users-reporting-server-500-error/#comment-5826

    If it’s an upgrade…. that’s something I don’t have any ideas about, sorry.

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Invalid argument …foreach() in capabilities.php’ is closed to new replies.