Guest Posted September 1, 2008 Posted September 1, 2008 Hi can anyone point out what might be causing the following error messages are appearing when I update a product in the admin. Warning: Invalid argument supplied for foreach() in /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/reset_meta_cache.php on line 36 Warning: Cannot modify header information - headers already sent by (output started at /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/reset_meta_cache.php:36) in /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/functions/general.php on line 22 Hopefully its something simple, pages still update the info I change and meta tags are created on the pages with no problems. Thanks for any help with this. Here's a link if it helps, bathireland.com Quote
shoaibkhan Posted September 1, 2008 Posted September 1, 2008 1.reset_meta_cache.php near line 36 make sure that the value passing in foreach is not null like if($val !== "") { foreach($val as $value) { //statement } } 2. general.php on line 22 check whether you had given a echo some where, if there then comment it out. hope this will solve your problem.. Hi can anyone point out what might be causing the following error messages are appearing when I update a product in the admin. Warning: Invalid argument supplied for foreach() in /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/reset_meta_cache.php on line 36 Warning: Cannot modify header information - headers already sent by (output started at /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/reset_meta_cache.php:36) in /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/functions/general.php on line 22 Hopefully its something simple, pages still update the info I change and meta tags are created on the pages with no problems. Thanks for any help with this. Here's a link if it helps, bathireland.com Quote
Guest Posted September 1, 2008 Posted September 1, 2008 shoaibkhan thansk for replying have had a look and it looks ok to me, but i'm far from an expert. I have posted the sections of code below reset_meta_cache.php near line 36 code reads as follows foreach (glob($meta_cache_files_path."{*.meta-cache}", GLOB_BRACE) as $filename_page) { unlink($filename_page); } $exists = mysql_query("SELECT 1 FROM cache LIMIT 0"); if ($exists) tep_db_query("DELETE FROM cache WHERE cache_name LIKE '%meta-cache'"); general.php line 22 reads header('Location: ' . $url); Karl Quote
Guest Posted November 3, 2008 Posted November 3, 2008 Good evening, I was pleasantly surprised to read that somebody had the same errors on the same file in the same lines. I've been searching this forum for a solution but could not find any. It is not the common error with text or space after or before the <?php or ?> Can the cause perhaps be found this time ? Best Regards Nala Hi can anyone point out what might be causing the following error messages are appearing when I update a product in the admin. Warning: Invalid argument supplied for foreach() in /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/reset_meta_cache.php on line 36 Warning: Cannot modify header information - headers already sent by (output started at /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/reset_meta_cache.php:36) in /var/www/htdocs/ifdnrg_sites/www.castironbaths.ie/catalog/admin/includes/functions/general.php on line 22 Hopefully its something simple, pages still update the info I change and meta tags are created on the pages with no problems. Thanks for any help with this. Here's a link if it helps, bathireland.com Quote
Guest Posted July 7, 2009 Posted July 7, 2009 I had the same problem. I // out line 27 in the categories.php file which said " if ( eregi("(insert|update|setflag|confirm)", $action) ) include_once('includes/reset_meta_cache.php');" no error message , but no idea what it will do to the meta module output. Quote
Guest Posted July 16, 2009 Posted July 16, 2009 I also get this error, has anyone identified a fix, its annoying more than anything and it is intermittent and for me usually occurs when i toggle a product from being out of stock to being in stock Quote
buldysor Posted July 17, 2009 Posted July 17, 2009 Hello. I have a problem with the title and the description of the page. This are identical. I need a smaller title, and I need the discription separate. Can you help please. Take a look: www.parfumurione.net Quote
Guest Posted July 17, 2009 Posted July 17, 2009 i think i found a fix for my problem, it was listed on a Dutch Oscommerce forum, all i did was the following: change this: foreach (glob($meta_cache_files_path."{*.meta-cache}", GLOB_BRACE) as $filename_page) { unlink($filename_page); } to this if (is_array ($meta_cache_files_path ."{*. meta-cache }")){ foreach (glob($meta_cache_files_path."{*.meta-cache}", GLOB_BRACE) as $filename_page) { unlink($filename_page); } } in /admin/includes/reset_meta_cache.php seems to have worked thus far :) cclayton 1 Quote
cclayton Posted November 8, 2012 Posted November 8, 2012 i think i found a fix for my problem, it was listed on a Dutch Oscommerce forum, all i did was the following: change this: foreach (glob($meta_cache_files_path."{*.meta-cache}", GLOB_BRACE) as $filename_page) { unlink($filename_page); } to this if (is_array ($meta_cache_files_path ."{*. meta-cache }")){ foreach (glob($meta_cache_files_path."{*.meta-cache}", GLOB_BRACE) as $filename_page) { unlink($filename_page); } } in /admin/includes/reset_meta_cache.php seems to have worked thus far This worked for me, thanks. Quote Founder & Director at CSC Tours Ltd
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.