Guest Posted March 5, 2007 Share Posted March 5, 2007 I think I botched the install. From my os admin page I click on modules, STS is listed to the left. I click on it. The +install button is to the right, I click on it and nothing happens. Ideas? Quote Link to comment Share on other sites More sharing options...
Guest Posted March 5, 2007 Share Posted March 5, 2007 It might be the location I copy and pasted it. oscommerce/catalog to find the blank template I have to follow oscommerce/catalog/catalog/includes/sts templates... Should I have pasted it right into oscommerce as to overwrite the catalog file? Any help troubleshooting would be appreciated. -Dano Quote Link to comment Share on other sites More sharing options...
bkellum Posted March 5, 2007 Share Posted March 5, 2007 It might be the location I copy and pasted it. oscommerce/catalog to find the blank template I have to follow oscommerce/catalog/catalog/includes/sts templates... Should I have pasted it right into oscommerce as to overwrite the catalog file? Any help troubleshooting would be appreciated. -Dano Dan,If this is a new installation of osC 060817, then you are experiencing the widely known "refresh bug" of the modules section which includes shipping, payment, etc. There is a simple fix: 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. 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...
Guest Posted March 5, 2007 Share Posted March 5, 2007 Thanks Bill, Still no dice. I am new to both PHP and oscommerce. Attached are some screen shots of how the path is set up and where I inserted the code into the php. Error in oscom consol The paths on the server... Example of where I instered code in PHP... Another dreamweaver screen of paths/code I successfully installed "easy populate" last night, could that be the problem? Thanks in advance, Dano Quote Link to comment Share on other sites More sharing options...
bkellum Posted March 6, 2007 Share Posted March 6, 2007 It might be the location I copy and pasted it. oscommerce/catalog to find the blank template I have to follow oscommerce/catalog/catalog/includes/sts templates... Should I have pasted it right into oscommerce as to overwrite the catalog file? Any help troubleshooting would be appreciated. -Dano Dan, Not sure if the above was a typo but you should not have the two "catalog" folders. If your store had a actual "catalog" folder where all the osCommerce files were located, then that would have been the location where the STS contribution "modified_files/catalog" and "new_files/catalog" would have needed to be uploaded to. NOTE: The term "catalog" is used throughout all osCommerce contributions as the name of the folder where your store catalog files are located (all of your osCommerce files). 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...
m45537 Posted March 8, 2007 Share Posted March 8, 2007 Anyone have any idea how I might resolve this error...? Fatal error: Cannot redeclare get_javascript() (previously declared in /home/pro-scre/public_html/includes/functions/sts.php:91) in /home/pro-scre/public_html/includes/sts_display_output.php on line 419 Thanks, Mike Quote Link to comment Share on other sites More sharing options...
bkellum Posted March 8, 2007 Share Posted March 8, 2007 Anyone have any idea how I might resolve this error...? Fatal error: Cannot redeclare get_javascript() (previously declared in /home/pro-scre/public_html/includes/functions/sts.php:91) in /home/pro-scre/public_html/includes/sts_display_output.php on line 419 Thanks, Mike Mike, it appears you may have an older version of STS installed. You will need to remove the older version before installing STSv4.x. 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...
JuanIgnacio Posted November 30, 2007 Share Posted November 30, 2007 I have a weird problem. 5 minutes ago login.php worked perfect, now I changed an image name and can't fix it. I replaced tep_image_button('button_continue.gif', for button_register.gif in login.php. After that this start happening: Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/.../public_html/includes/functions/compatibility.php:19) in /home/.../public_html/includes/functions/compatibility.php on line 29 And this is the code: line 19: 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); line 29: } I uploaded a previuos version of login.php just in case I modified something else by accident but this keeps happening. I have STS 4.5.3. Could that be it?? 6 minutes ago was working, what could have happened :S ? Quote Link to comment Share on other sites More sharing options...
bkellum Posted December 1, 2007 Share Posted December 1, 2007 I have a weird problem. 5 minutes ago login.php worked perfect, now I changed an image name and can't fix it. I replaced tep_image_button('button_continue.gif', for button_register.gif in login.php. After that this start happening: Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/.../public_html/includes/functions/compatibility.php:19) in /home/.../public_html/includes/functions/compatibility.php on line 29 And this is the code: line 19: 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); line 29: } I uploaded a previuos version of login.php just in case I modified something else by accident but this keeps happening. I have STS 4.5.3. Could that be it?? 6 minutes ago was working, what could have happened :S ? This may be from a cache problem. Try viewing your site from a different computer. Also, STSv4.5.8 has a lot of bug fixes from the version you are currently using. 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...
JuanIgnacio Posted December 3, 2007 Share Posted December 3, 2007 (edited) This may be from a cache problem. Try viewing your site from a different computer.Also, STSv4.5.8 has a lot of bug fixes from the version you are currently using. I updated to sts 4.5.8 and tried from other pcs and the issue is still there. The thing is that the line that is supposed to have an error, its just a }. A "}" does not declare a function so It cant cause a redeclare function error. WTF is going on? Is is safe to delete the whole function from compability.php? I need this issue gone ASAP Just had an idea: is there a function to detect if a function has been created or not? So i can add this to fix the issue: if (do_magic_quotes_gpc is not declared) { do_magic_quotes_gpc() {.....} } Edited December 3, 2007 by JuanIgnacio Quote Link to comment Share on other sites More sharing options...
Alexian Posted February 29, 2008 Share Posted February 29, 2008 I updated to sts 4.5.8 and tried from other pcs and the issue is still there. The thing is that the line that is supposed to have an error, its just a }. A "}" does not declare a function so It cant cause a redeclare function error. WTF is going on? Is is safe to delete the whole function from compability.php? I need this issue gone ASAP Just had an idea: is there a function to detect if a function has been created or not? So i can add this to fix the issue: if (do_magic_quotes_gpc is not declared) { do_magic_quotes_gpc() {.....} } I got the same problem. Same code Same thing. I got it on line 30: //// // Recursively handle magic_quotes_gpc turned off. // This is due to the possibility of have an array in // $HTTP_xxx_VARS // Ie, products attributes function do_magic_quotes_gpc(&$ar) { if (!is_array($ar)) return false; reset($ar); while (list($key, $value) = each($ar)) { if (is_array($ar[$key])) { do_magic_quotes_gpc($ar[$key]); } else { $ar[$key] = addslashes($value); } } reset($ar); } Quote Link to comment Share on other sites More sharing options...
mikevanbibber Posted March 27, 2009 Share Posted March 27, 2009 I also have the same problem. (Fatal error... redeclare magic quotes ....) Has anyone any luck in solving this? Mike Quote Mike VanBibber Email me Link to comment Share on other sites More sharing options...
bhbilbao Posted February 3, 2010 Share Posted February 3, 2010 Same problem here. In this case in Order Editof contribution, after clicking "Send order confirmation email". Anyone solved this before?? Quote Link to comment Share on other sites More sharing options...
Venema Posted April 8, 2010 Share Posted April 8, 2010 Same problem here. In this case in Order Editof contribution, after clicking "Send order confirmation email". Anyone solved this before?? I'm having the same issue - after an order goes all the way through and I hit the last step <confirm order> and press that I get this error.. Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/empirest/public_html/includes/functions/compatibility.php:18) in /home/empirest/public_html/includes/functions/compatibility.php on line 30 any idea's on what to look for and change. Quote Link to comment Share on other sites More sharing options...
furan Posted April 8, 2010 Share Posted April 8, 2010 Hello, I have a little doubt. I am modifying files to install the sts, particularly now the admin / includes / boxes / modules.php according to the manual I have to look: .'' BOX_MODULES_PAYMENT. '' and then write: / / START STS 4.1 .'' BOX_MODULES_STS. .'' / / END STS 4.1 Part of code is this: if ($ selected_box == 'modules') ( $ Contents [] = array ('text' => '<a href="'. Tep_href_link(FILENAME_MODULES,'set=payment','NONSSL').'" Class="menuBoxContentLink">'. BOX_MODULES_PAYMENT. '</ a> <br> '. '<a Href="'. Tep_href_link(FILENAME_MODULES,'set=shipping','NONSSL').'" Class="menuBoxContentLink">'. BOX_MODULES_SHIPPING. '</ A> <br>'. '<a Href="'. Tep_href_link(FILENAME_MODULES,'set=ordertotal','NONSSL').'" Class="menuBoxContentLink">'. BOX_MODULES_ORDER_TOTAL. '</ A>'); ) and my question is .... :) Where is next? ... I guess it will be a triviality, but better to ask. I hope you can lend a hand. thanks Quote Link to comment Share on other sites More sharing options...
bkellum Posted April 16, 2010 Share Posted April 16, 2010 Hello, I have a little doubt. I am modifying files to install the sts, particularly now the admin / includes / boxes / modules.php according to the manual I have to look: .'' BOX_MODULES_PAYMENT. '' and then write: / / START STS 4.1 .'' BOX_MODULES_STS. .'' / / END STS 4.1 Part of code is this: if ($ selected_box == 'modules') ( $ Contents [] = array ('text' => '<a href="'. Tep_href_link(FILENAME_MODULES,'set=payment','NONSSL').'" Class="menuBoxContentLink">'. BOX_MODULES_PAYMENT. '</ a> <br> '. '<a Href="'. Tep_href_link(FILENAME_MODULES,'set=shipping','NONSSL').'" Class="menuBoxContentLink">'. BOX_MODULES_SHIPPING. '</ A> <br>'. '<a Href="'. Tep_href_link(FILENAME_MODULES,'set=ordertotal','NONSSL').'" Class="menuBoxContentLink">'. BOX_MODULES_ORDER_TOTAL. '</ A>'); ) and my question is .... Where is next? ... I guess it will be a triviality, but better to ask. I hope you can lend a hand. thanks Why even ask?? The contribution comes with the file in question so all you have to do is a file comparison to see where the code should go. 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...
Guest Posted May 15, 2010 Share Posted May 15, 2010 hi i have read the forums, tried several things, uploaded new files to change but nothing, i still get the following error in admin "PAYMENT MODULES" Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/adawn/public_html/coin-collect.com/catalogcc/admin/includes/functions/compatibility.php:18) in /home/adawn/includes/functions/compatibility.php on line 30 SHIPPING MODULES Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/adawn/public_html/coin-collect.com/catalogcc/admin/includes/functions/compatibility.php:18) in /home/adawn/public_html/coin-collect.com/catalogcc/admin/includes/functions/compatibility.php on line 30 CAN SOMEONE PLEASE HELP.... Kind regards Dawn Quote Link to comment Share on other sites More sharing options...
bkellum Posted May 16, 2010 Share Posted May 16, 2010 hi i have read the forums, tried several things, uploaded new files to change but nothing, i still get the following error in admin "PAYMENT MODULES" Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/adawn/public_html/coin-collect.com/catalogcc/admin/includes/functions/compatibility.php:18) in /home/adawn/includes/functions/compatibility.php on line 30 SHIPPING MODULES Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/adawn/public_html/coin-collect.com/catalogcc/admin/includes/functions/compatibility.php:18) in /home/adawn/public_html/coin-collect.com/catalogcc/admin/includes/functions/compatibility.php on line 30 CAN SOMEONE PLEASE HELP.... Kind regards Dawn So, if you get the Fatal error: Cannot redeclare do_magic_quotes.gpc() [...] then note which php file you called when you got the error, and make sure you haven't mistakenly copied the same file to the languages folder. These errors usually mean you copied a file to the wrong folder and in the process may have inadvertantly copied over a necessary file of the same name (but in a different folder). 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...
mikevanbibber Posted July 27, 2010 Share Posted July 27, 2010 I had the same problem and found that i had uploaded a file to the wrong directory. (The file had the same name.) I discovered this by looking at the size of the file. The file size was very different than the one in the original installation package. to correct it i uploaded the original file over top of the file i accidentally uploaded. Good luck. Mike Quote Mike VanBibber Email me Link to comment Share on other sites More sharing options...
bkellum Posted July 30, 2010 Share Posted July 30, 2010 I had the same problem and found that i had uploaded a file to the wrong directory. (The file had the same name.) I discovered this by looking at the size of the file. The file size was very different than the one in the original installation package. to correct it i uploaded the original file over top of the file i accidentally uploaded. Good luck. Mike Yes, osCommerce has a lot of files with the same name, but the key is that they are located in specific folders. For example, files that osCommerce would "include" in a page would be found in the "includes" folder. Well, since there is a frontend catalog (includes) and a backend admin(admin/includes) that would use file includes, they both have an "includes" folder. In either the admin or the catalog (frontend), both may have a modules section for example and the same name issues would be found there as well. Before installing ANY add-on to osCommerce, it is a good idea to get familiar with the folder structure and the overall flow of the program first. It will make installing contributions (add-ons) a lot easier to understand. 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...
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.