Invalid argument …foreach() in capabilities.php
-
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
- The topic ‘Invalid argument …foreach() in capabilities.php’ is closed to new replies.