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

Popularity: 13% [?]

Want to work hard and play hard?
 Get Inside Story by E-Mail     Subscribe with Your Favorite Reader

Save To Del.icio.us | Digg This | Stumble It



Your Ad Here