kezza01 Posted August 25, 2006 Share Posted August 25, 2006 Hello Everybody, I have a really weird problem and don't know the solution, that's why I will ask you for some help. I have tried to find a solution on this board, but without any results :( When I change a setting in by example the paypal module, and then save the settings by pressing the update button, nothing will be saved. I hope somebody can help me! Gr. Kezza! :) Link to comment Share on other sites More sharing options...
♥Vger Posted August 25, 2006 Share Posted August 25, 2006 Make sure that permissions on all your folders are set to 755, with permissions of 644 for all files - except for the two configure.php files, which can be either 644, 444 or 400 - depending on server setup. Vger Link to comment Share on other sites More sharing options...
brett.howard Posted August 25, 2006 Share Posted August 25, 2006 I was having the same problem! The update of any payment or shipping module attributes failed. I could see the attibutes in the database and edit them manually with phpmyadmin but no changes were saved if I hit the update button in the admin tool. I figured it had to be a bug or error in the admin tool itself rather than the module and with a little poking I found the problem is with a line in the /catalog/admin/modules.php file. the line : while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { does not execute on my system, even tho' the syntax looks correct to me! I simply commented that line out and replaced it with the simple line: foreach ($HTTP_POST_VARS['configuration'] as $key => $value){ which is a much easier way of doing the exact same thing the original line is supposed to do. then all was fine. Hope this helps as I searched then net for a solution and found nada! Cheers, Brett Link to comment Share on other sites More sharing options...
kezza01 Posted August 26, 2006 Author Share Posted August 26, 2006 I was having the same problem! The update of any payment or shipping module attributes failed. I could see the attibutes in the database and edit them manually with phpmyadmin but no changes were saved if I hit the update button in the admin tool. I figured it had to be a bug or error in the admin tool itself rather than the module and with a little poking I found the problem is with a line in the /catalog/admin/modules.php file. the line : while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { does not execute on my system, even tho' the syntax looks correct to me! I simply commented that line out and replaced it with the simple line: foreach ($HTTP_POST_VARS['configuration'] as $key => $value){ which is a much easier way of doing the exact same thing the original line is supposed to do. then all was fine. Hope this helps as I searched then net for a solution and found nada! Cheers, Brett Thank you So Much, it Works! :D :D Gr. Kezza! Link to comment Share on other sites More sharing options...
Guest Posted August 27, 2006 Share Posted August 27, 2006 Thank you So Much, it Works! :D :D Gr. Kezza! THX 2 !!! :D :D :D :thumbsup: GreeTZ Franz Link to comment Share on other sites More sharing options...
superfrank Posted August 30, 2006 Share Posted August 30, 2006 Worked for me too, you're brilliant!!! Thanks! Link to comment Share on other sites More sharing options...
natewlew Posted August 30, 2006 Share Posted August 30, 2006 Thanks, this also solved my problem! Wonderful! :thumbsup: :thumbsup: Other great Open Source (Free) programs: (Free as in free speech not free beer) The Gimp - An image program. | Firefox - All you have to do is add the Web Developer add-on to make this web browser complete. | FileZilla - An ftp program. | Inkscape - A good program to create images with. | Thunderbird - An email program. | Openoffice.org - An office suite that is compatible with MS Office. | Abiword - Another office suite. | Audacity - A sound recording tool. | ddp's Picks | Wordpress - An easy to use blogging software. | Joomla - An easy to use CMS that has ecommerce plug-ins. | Drupal - Another CMS How do I find these programs? Google Search! Link to comment Share on other sites More sharing options...
jasonabc Posted September 6, 2006 Share Posted September 6, 2006 I noticed this was happening "out of the box" with the most recent OSC snapshot (Update 060817). Previous installations are fine. Many thanks Brett for the fix. Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix Link to comment Share on other sites More sharing options...
Guest Posted September 6, 2006 Share Posted September 6, 2006 I just spent hours trouble shooting to figure out what I was doing wrong... I actually even uninstalled and reinstalled the cart several times ect... I should have just came here LOL Thanks sooooo much! This solution worked!!!... I do have a question tho... not important but my curiousity is killing me... I DLed ONE copy of osCommerse... I installed on my site... and using the same files, I also installed it on a friends site as well (right after mine was done - same day). However, I ran into this problem but she did not. How could that be possible? Thanks Brett!!!!!!!!!!!!!!!!!!!!!!!!!!! Always, Bree Link to comment Share on other sites More sharing options...
msquared.id.au Posted September 10, 2006 Share Posted September 10, 2006 the line :while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { does not execute on my system, even tho' the syntax looks correct to me! I simply commented that line out and replaced it with the simple line: foreach ($HTTP_POST_VARS['configuration'] as $key => $value){ If the original way of doing things was correct, then the correct way to fix this is to add this line before the while loop: reset($HTTP_POST_VARS['configuration']); But hey, as long as it works it doesn't really matter. :D Quick question: did this surface after applying STS 4.2 or similar? I discovered this problem after installing STS 4.2, but I didn't try configuring anything before applying the patch, so I don't know if it triggered the problem or not. Note that the documentation for each() recommends using reset(), so it's probably a bug that needs to be reported upstream... Link to comment Share on other sites More sharing options...
wolfgang.voigt Posted September 12, 2006 Share Posted September 12, 2006 If the original way of doing things was correct, then the correct way to fix this is to add this line before the while loop: reset($HTTP_POST_VARS['configuration']); for me , i can report that this " reset($HTTP_POST_VARS['configuration']); " solves the problem, and now i can set the value -using simple t s to "true"- thx for ya help & hint, great work dude :-" Link to comment Share on other sites More sharing options...
dollyllama Posted September 17, 2006 Share Posted September 17, 2006 thank you. People This is the answer your looking for. Link to comment Share on other sites More sharing options...
dnoone Posted September 19, 2006 Share Posted September 19, 2006 I have tried all this and I am still having the same problem. # Any ideas. Thanks, thank you. People This is the answer your looking for. Link to comment Share on other sites More sharing options...
enny802 Posted October 3, 2006 Share Posted October 3, 2006 Make sure that permissions on all your folders are set to 755, with permissions of 644 for all files - except for the two configure.php files, which can be either 644, 444 or 400 - depending on server setup. Vger it still doesn't work. i did like your instruction. i can't find the way out :'( Link to comment Share on other sites More sharing options...
MontanaMan Posted December 13, 2006 Share Posted December 13, 2006 This (replacing the line of code in the modules.php file) worked for me too. Thank you, thank you, thank you. Link to comment Share on other sites More sharing options...
WarDog Posted December 17, 2006 Share Posted December 17, 2006 I have tried all this and I am still having the same problem.# Any ideas. Thanks, Note that if you have already applied the register globals patch then you need to insert : reset($_POST['configuration']); not reset($HTTP_POST_VARS['configuration']); And then, hey presto it all works. Link to comment Share on other sites More sharing options...
DonSleightholme Posted January 4, 2007 Share Posted January 4, 2007 Cheers, Brett.. You're a star mate. I been trying to get this to work for hours... Link to comment Share on other sites More sharing options...
Guest Posted February 17, 2007 Share Posted February 17, 2007 I noticed this was happening "out of the box" with the most recent OSC snapshot (Update 060817). Previous installations are fine. Many thanks Brett for the fix. The fixes suggested aren't working for me. Is there some way I can get the previous modules.php and give that a try? Or will I simply break other things? Link to comment Share on other sites More sharing options...
Guest Posted February 18, 2007 Share Posted February 18, 2007 The fixes suggested aren't working for me. Is there some way I can get the previous modules.php and give that a try? (I've already reloaded a clean copyof modules.php from 2.2-2) Or will I simply break other things? There are a total of four changes suggested above and, one at a time, I have made all of them. The file catalog/admin/includes/modules.php (I hope I've been editing the correct file!) has perms of 755. I've been commenting out using // and //, or /* */ The most recent error message is: Warning: reset() [function.reset]: Passed variable is not an array or object in /home/nmwoodwo/public_html/catalog/admin/modules.php on line 49 Warning: Variable passed to each() is not an array or object in /home/nmwoodwo/public_html/catalog/admin/modules.php on line 50 Warning: Cannot modify header information - headers already sent by (output started at /home/nmwoodwo/public_html/catalog/admin/modules.php:49) in /home/nmwoodwo/public_html/catalog/admin/includes/functions/general.php on line 18 and the relevant sections of the modules.php file look like this: //foreach ($HTTP_POST_VARS['configuration'] as $key => $value){// //reset($HTTP_POST_VARS['configuration']);// reset($_POST['configuration']); while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) { I've come a long way already ... too far to quit now. But I'm stopped 'cause I'm stumped. Link to comment Share on other sites More sharing options...
PineyWoods Posted February 19, 2007 Share Posted February 19, 2007 Thank you, thank you, thank you. Link to comment Share on other sites More sharing options...
satter9 Posted February 20, 2007 Share Posted February 20, 2007 Thank You!!!!!!!!!!!!!!!!!!!!!!! Looked Everywhere and finally found it. Link to comment Share on other sites More sharing options...
togrok Posted February 23, 2007 Share Posted February 23, 2007 Hi, I'm having the same problem and none of the above solutions helped. I did install the updated version. Was the update a complete install or did I have to have the older version in first? Thanks, Bob Link to comment Share on other sites More sharing options...
bkellum Posted February 23, 2007 Share Posted February 23, 2007 Hi, I'm having the same problem and none of the above solutions helped. I did install the updated version. Was the update a complete install or did I have to have the older version in first? Thanks, Bob Bob, This is a known bug in the latest osCommerce 060817 release and has to do with the modules not refreshing with udated changes in the admin. This fix has worked for several users: 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. 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...
pollinh Posted February 24, 2007 Share Posted February 24, 2007 hello i try this and is not working after i replace (HTTP_POST_VARS['configuration'] as $key => $value) i get this error Parse error: syntax error, unexpected '[' in /is/htdocs/wpXXXXXXX_XXXXXXXX/www/admin/modules.php on line 46 i use log in over https://ssl.sssss.com/xxxxxx.com/admin/modu...xxxxxxxxxxxxxxx any idea?? thank you Link to comment Share on other sites More sharing options...
Guest Posted April 17, 2007 Share Posted April 17, 2007 thank you brett.howard!!! worked great for me after 6 hours of pulling out my hair :P and thanks to Vger for pointing me here! cheers, snuggles Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.