Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

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

Posted

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

Posted

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

  • 2 months later...
Posted

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

  • 8 months later...
Posted

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.

  • 2 weeks later...
Posted

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

Posted

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

Posted

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 :)

  • 3 years later...
Posted

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 smile.gif

 

This worked for me, thanks.

Founder & Director at CSC Tours Ltd

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...