bkellum Posted May 8, 2007 Share Posted May 8, 2007 Hey guys, I have tried both versions of fixes to the modules.php and the compatibility.php files, seperatley and together in every combination and I have gotten nothing... Does anyone have any suggestions the server is on php4.4.4 mysql is v4.0.26 and the osc is the latest... honestly i wouldnt mind a link to a site with a very slightly older version of osC.. my first post but thanks every1 for the help over the years! Alex Alex, try the following contribution that updates version 060817 with all of the latest bug fixes (it might solve your issue):http://www.oscommerce.com/community/contributions,4691 Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
jalonek Posted July 27, 2007 Share Posted July 27, 2007 -OR-You can try this: 1. Open the catalog/admin/includes/functions/compatibility.php. 2. At the end of the “do_magic_quotes_gpc” routine, add the following code: reset($ar); It will end up looking like this: function do_magic_quotes_gpc(&$ar) { if (!is_array($ar)) return false; while (list($key, $value) = each($ar)) { if (is_array($ar[$key])) { do_magic_quotes_gpc($ar[$key]); } else { $ar[$key] = addslashes($value); } } reset($ar); } 3. Do the same for the compatibility.php file located in catalog/includes/functions/compatibility.php. This is from a bug in the latest version of osC 060817. Thanks For me work great Quote Link to comment Share on other sites More sharing options...
rakimonmic Posted November 22, 2007 Share Posted November 22, 2007 foreach ($HTTP_POST_VARS['configuration'] as $key => $value){ did the trick for me. I use the latest version of oscomm. thx Quote Link to comment Share on other sites More sharing options...
bkellum Posted November 23, 2007 Share Posted November 23, 2007 foreach ($HTTP_POST_VARS['configuration'] as $key => $value){ did the trick for me. I use the latest version of oscomm. thx The latest version of osCommerce (Online Merchant RC1) has the fix that I mentioned above already integrated into the code. Maybe you are using the older 060817 version. Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
JustSomeone Posted December 5, 2007 Share Posted December 5, 2007 The first solution worked for me - thanks all. Quote Link to comment Share on other sites More sharing options...
RonGabrys Posted February 10, 2008 Share Posted February 10, 2008 -OR-You can try this: 1. Open the catalog/admin/includes/functions/compatibility.php. 2. At the end of the “do_magic_quotes_gpc” routine, add the following code: reset($ar); It will end up looking like this: function do_magic_quotes_gpc(&$ar) { if (!is_array($ar)) return false; while (list($key, $value) = each($ar)) { if (is_array($ar[$key])) { do_magic_quotes_gpc($ar[$key]); } else { $ar[$key] = addslashes($value); } } reset($ar); } 3. Do the same for the compatibility.php file located in catalog/includes/functions/compatibility.php. This is from a bug in the latest version of osC 060817. Thanks, found your fix today and it worked great. Quote Link to comment Share on other sites More sharing options...
trusting Posted February 25, 2008 Share Posted February 25, 2008 Thank you! Thank you! Thank you! I was having the same problem with the SHIPPING module continually reverting to the default settings. I followed the solution of just adding "reset ($ar);" in the 2 files indicated and it WORKS! Just for the record for you guys working on figuring it out: It had been working fine. Then I went to update the shipping info and it reverted to default. After that I couldn't get it to take anything else. The site is on a PHP4 server. Thanks again and God bless! Teresa :-) Quote Link to comment Share on other sites More sharing options...
derekmcd Posted April 9, 2008 Share Posted April 9, 2008 I am having the same issues. Credit Card, Shipping etc. always stays at default values. The first suggestion Was already done, the second add reset($ar); and it disabled the storefront and just had a blank screen. Any help would be appreciated. Quote Link to comment Share on other sites More sharing options...
derekmcd Posted April 9, 2008 Share Posted April 9, 2008 I was inaccurate in my first post The first suggestion fixed my problem (thought I saved the file). Thanks Guys Quote Link to comment Share on other sites More sharing options...
seanw Posted May 6, 2008 Share Posted May 6, 2008 We experienced the module update issue and have Php 4.4.7, osCommerce 2.2 and MySql 5.0.45 on our site hosted by StartLogic. Changing the while to a foreach loop in modules.php fixed it for us. Quote Link to comment Share on other sites More sharing options...
seanpatrick Posted June 27, 2008 Share Posted June 27, 2008 bkellum's fix worked for me! thanks! Quote Link to comment Share on other sites More sharing options...
annabelt Posted September 1, 2008 Share Posted September 1, 2008 I also had this problem with 2.2 rc2a and the first fix seems to have worked - it's updating now - thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted November 3, 2009 Share Posted November 3, 2009 1) Open /admin/modules.php 2) Change this line: while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { to this: foreach ($HTTP_POST_VARS['configuration'] as $key => $value){ 3) Save the file. Hi all, I've tried this fix because i'm having the same issue with the PayPal Standard module not updating in admin. I've opened admin/modules.php but the line of code mentioned above isn't there. I have: while (list($key, $value) = each($mInfo->keys)) { I also tried the second fix mentioned on here, but my compatibility.php files already have the reset($ar); Any pointers would be great.. i'm at a total loss here..... thanks 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.