nlwebhosting Posted April 8, 2008 Share Posted April 8, 2008 Last week my server was upgraded to PhP v5.x and now when i make changes via admin console i get the folowing message. I have check all support pages and searched for the mentioned "blank spaces" in the "reset_meta_cache.php" but there is nothing wrong. with phpv4.x all was working fine. any tips ? Warning: Invalid argument supplied for foreach() in ../catalog/admin/includes/reset_meta_cache.php on line 36 Warning: Cannot modify header information - headers already sent by (output started at ../catalog/admin/includes/reset_meta_cache.php:36) in /home/sexcamm/domains/hifitubes.nl/public_html/catalog/admin/includes/functions/general.php on line 22 Quote Link to comment Share on other sites More sharing options...
Guest Posted July 7, 2009 Share Posted July 7, 2009 I had the same problem after I moved a store. I // out line 27 in categories.php which said " if ( eregi("(insert|update|setflag|confirm)", $action) ) include_once('includes/reset_meta_cache.php');" there error goes away so my client can edit. not sure what this will do to the meta module. Keep ya posted. Quote Link to comment Share on other sites More sharing options...
cujimmy Posted July 1, 2010 Share Posted July 1, 2010 1) Backup admin/includes/reset_meta_cache.php 2) Replace its entire contents with this: <?php /*=======================================================================*\ || #################### //-- SCRIPT INFO --// ########################### || || # Script name: meta_tags.php # || || # Contribution: cDynamic Meta Tags # || || # Version: 1.4 # || || # Date: Jan 17 2009 # || || # ------------------------------------------------------------------ # || || #################### //-- COPYRIGHT INFO --// ######################## || || # Copyright (C) 2005 Chris LaRocque # || || # # || || # This script is free software; you can redistribute it and/or # || || # modify it under the terms of the GNU General Public License # || || # as published by the Free Software Foundation; either version 2 # || || # of the License, or (at your option) any later version. # || || # # || || # This script is distributed in the hope that it will be useful, # || || # but WITHOUT ANY WARRANTY; without even the implied warranty of # || || # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # || || # GNU General Public License for more details. # || || # # || || # Script is intended to be used with: # || || # osCommerce, Open Source E-Commerce Solutions # || || # http://www.oscommerce.com # || || # Copyright (c) 2003 osCommerce # || || ###################################################################### || \*========================================================================*/ #--------------------------------------------------------------------------# ############################################################################ # cache path... make sure it is the same as you # specified in includes/meta_tags.php (if you changed it) MUST HAVE READ/WRITE CHMOD to 777 $meta_cache_files_path = DIR_FS_CATALOG.'cache/'; //this should work for most # DO NOT ALTER OR EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING # // BOF bugfix (error msg when cache folder is empty), changed: //foreach (glob($meta_cache_files_path."{*.meta-cache}", GLOB_BRACE) as $filename_page) { // unlink($filename_page); // } // in: 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); } } // EOF bugfix (error msg when cache folder is empty) $exists = mysql_query("SELECT 1 FROM cache LIMIT 0"); if ($exists) tep_db_query("DELETE FROM cache WHERE cache_name LIKE '%meta-cache'"); ?> 3) have a beer or take the dog for a walk Quote Link to comment Share on other sites More sharing options...
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.