Jump to content
Sign in to follow this  
satter9

Payment Modules will not Update

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

Share this post


Link to post
Share on other sites
-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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
-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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×