Title: WP Error? (Help)
Last modified: August 18, 2016

---

# WP Error? (Help)

 *  [tamzarian](https://wordpress.org/support/users/tamzarian/)
 * (@tamzarian)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/wp-error-help/)
 * Hi everyone, I have recently installed WP 2.0 on a new site. No upgrades, just
   a normal install. At the top of my page it says “Warning: Invalid argument supplied
   for foreach() in /home/waterblo/public_html/wp-includes/capabilities.php on line
   19” What does this mean? How can I fix it?
 * Thank you!
 * EDIT: It seems that I cant login to the admin section! This is the error I get,“
   Warning: Invalid argument supplied for foreach() in /home/waterblo/public_html/
   wp-includes/capabilities.php on line 19
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/waterblo/public_html/wp-includes/capabilities.php:19) in /home/waterblo/
   public_html/wp-includes/pluggable-functions.php on line 177″

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

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/wp-error-help/#post-317667)
 * Try this, see if it helps:
    [http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F](http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F)
 *  [jaredquinn](https://wordpress.org/support/users/jaredquinn/)
 * (@jaredquinn)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/wp-error-help/#post-317672)
 * You may want to keep an eye on this one:
 * [http://wordpress.org/support/topic/55710](http://wordpress.org/support/topic/55710)
 * It seems to be the same problem.
 *  [jaredquinn](https://wordpress.org/support/users/jaredquinn/)
 * (@jaredquinn)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/wp-error-help/#post-317675)
 * You can try changing line 19 of capabilities.php to:
 * `
    foreach ((array)$this->roles as $role => $data) {
 * The interesting thing here is that I don’t have a prefix_user_roles table (on
   my 2.0 database), which is where this particular function reads data from??
 *  Thread Starter [tamzarian](https://wordpress.org/support/users/tamzarian/)
 * (@tamzarian)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/wp-error-help/#post-317678)
 * Well, thanks for the help. I tried to fix it, but the error just jumps lines 
   on me. I think it has something to do with this:($this->roles as $role => $data)
   its on line 19, currently, its deleted from it (I took it out in an attempt to
   fix it). If anyone can help, thanks alot!!
 * EDIT: I didnt see all the posts everyone made, let me try those. If it doesn’t
   work, I’ll post back again.
 * 2nd EDIT: jaredquinn, THANKS! I got it to work now, the error is gone. A new 
   one has come up though! When I try to login to the admin page, it says I do not
   have sufficient permissions! I am logging in with the correct password to my 
   admin account. If anyone can help, triple thanks!
 *  [jaredquinn](https://wordpress.org/support/users/jaredquinn/)
 * (@jaredquinn)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/wp-error-help/#post-317687)
 * If you have a wp_user_roles table try renaming it to something else, I don’t 
   have one on my 2.0 install, yet the file you’re getting these errors in does 
   seem to query one (and gracefully exit if it doesn’t have one)
 *  [jaredquinn](https://wordpress.org/support/users/jaredquinn/)
 * (@jaredquinn)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/wp-error-help/#post-317688)
 * If you try the above you should backout the last thing I suggested too.
 *  Thread Starter [tamzarian](https://wordpress.org/support/users/tamzarian/)
 * (@tamzarian)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/wp-error-help/#post-317691)
 * Where would this file be? I am currently loading a backup (yesterdays). If it
   doesn’t work, I’ll have to look for that file. Thanks for all the help, I really
   appreciate it.
 *  [jaredquinn](https://wordpress.org/support/users/jaredquinn/)
 * (@jaredquinn)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/wp-error-help/#post-317692)
 * Sorry it is (could be) a database table…
 *  Thread Starter [tamzarian](https://wordpress.org/support/users/tamzarian/)
 * (@tamzarian)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/wp-error-help/#post-317695)
 * OK, I will be sure to look for that. Thanks again! (Still loading the backup :
   |)
 * EDIT: I got it to work, thanks!

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

The topic ‘WP Error? (Help)’ is closed to new replies.

## Tags

 * [errors](https://wordpress.org/support/topic-tag/errors/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 3 participants
 * Last reply from: [tamzarian](https://wordpress.org/support/users/tamzarian/)
 * Last activity: [20 years, 4 months ago](https://wordpress.org/support/topic/wp-error-help/#post-317695)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
