WordPress errors with capabilities.php, classes.php and the_excerpt_reloaded() fatal error

Written by Terence Chang on August 9th, 2007

For some reasons, I just recently received the following errors on one of my blog hosting accounts. Nothing has changed on the WordPress side. I was wondering what was changed on the hosting side. However, I could not get hold with the hosting company support. I finally found the resolutions.

Here is the error message suddenly appear. It seems to me something went wrong with the wordpress plugin.

Warning: Invalid argument supplied for foreach() in /home/myaccount/public_html/blogontshirt/wp-includes/capabilities.php on line 31
Warning: Invalid argument supplied for foreach() in /home/myaccount/public_html/blogontshirt/wp-includes/classes.php on line 88
I have also got the following error because I used the excerpt_reloaded plugin, which is using the above two php files.
Fatal error: Call to undefined function: the_excerpt_reloaded() in /home/myaccount/public_html/blogontshirt/wp-content/themes/silhouette-3column/home.php on line 20


Problem:
The problem is due to the PHP global valuable magic_quote been set to ON. I guess the hosting company reset the value and make it default to ON, which should be turned off.

Resolution:
Add the following line to the customized php.ini file under the root of the hosting account.

magic_quotes_runtime=off
magic_quotes_gpc=off


Or
Add the following lines in to the .htaccess file at your root of hosting account.

php_flag magic_quotes_runtime off
php_flag quotes_gpc off

 

8 Comments so far ↓

  1. dcr says:

    Aren’t you supposed to be on vacation? ;-) Bad time to have problems with your blog, eh? Glad you got them sorted out.

  2. Terence Chang says:

    @dcr:

    Thank you for stopping by. I am actually stay in house now. Hong Kong is under the Level 8 warnings of Typhoon, which is the highest alert in Hong Kong. So there will be no school, no open stores and no transportation. That’s not fun at all.

    One think I like about online business is that I can work from anywhere in the world. I can operate my online business from home as well as from Hong Kong. I really enjoy my vacation while working very hard to pay for my vacation cost. Isn’t that great?

  3. Luciano says:

    Ciao Terence, here I am from MBL community. I like your site and I am going to Fave it on my technoraty..please visit mine and if you wish do the same…thanks!

  4. Aww man not the ideal conditions for a vacation, hope it clears up soon and you can enjoy the rest of it. HK is a great place, been there a few times. I cant really comment on this post, I am dumb in techy matters. BTW I changed the header on my site, let me know what you think.

    Take care and cheers

  5. Stay safe out there Terence. I hope that you don’t get caught up in the typhoon.

    Keep posting. I don’t think I could last all that long without seeing new Terence Chang posts.

  6. Terence Chang says:

    @Luciano:

    Thank you for stopping by. I am glad that you like my blog. Hope you enjoy it.

  7. Terence Chang says:

    @Robin:

    Yeah. I was surprised that it just happened. I got that fixed. I will take a look at your blog later. Thanks!

  8. Terence Chang says:

    @Bryan:

    Thanks! I will keep updating my blog whenever I have chance. I will check out your blog too. Just keep it up!

Leave a Comment