Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Payment Modules will not Update


satter9

Recommended Posts

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

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

  • 2 months later...
-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

Link to comment
Share on other sites

  • 3 months later...
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.

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

  • 2 weeks later...
  • 2 months later...
-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.

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
  • 1 year later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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