View Single Post
  #1 (permalink)  
Old 24-05-2007, 14:09
AndyD's Avatar
AndyD AndyD is offline
Member
 
Join Date: Apr 2007
Posts: 53
Default foreach() error with WordPress

Hello All,

I recently came across many of our clients complaining about an error mentioned below, encountered with wordpress blogs installed on their website hostings:

Quote:
Warning: Invalid argument supplied for foreach() in /home/user/public_html/wp-includes/capabilities.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/wp-includes/capabilities.php:31) in /home/user/public_html/wp-includes/functions.php on line 1348
Fortunately, I did find a solution for this error. All I could make out is to 'turn off magic_quotes_runtime'. You can put the php_flag mentioned below under the .htaccess located in the wp installation folder and that's it, you are good to go

Quote:
php_flag magic_quotes_runtime off
__________________
@= EukHost =@
Linux / Windows Dedicated Servers || Linux VPS Hosting || Windows VPS Hosting

"The secret of greatness is simple: do better work than any other man in your field - and keep on doing it"
Reply With Quote