thebakerboy 0 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 Share this post Link to post Share on other sites
shoaibkhan 0 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 Share this post Link to post Share on other sites
thebakerboy 0 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 Share this post Link to post Share on other sites
Nala 0 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 Leben und leben lassen - live and let live - vivrer et laisser vivre Share this post Link to post Share on other sites
IDSwebdept 0 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. Share this post Link to post Share on other sites
fuzioneer 1 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 Share this post Link to post Share on other sites
buldysor 0 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 Share this post Link to post Share on other sites
fuzioneer 1 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 :) 1 cclayton reacted to this Share this post Link to post Share on other sites
cclayton 0 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. Founder & Director at CSC Tours Ltd Share this post Link to post Share on other sites