newtech Posted October 8, 2007 Share Posted October 8, 2007 I have oinstalled the discount coupon codes contrib. When I go to checkout, choose shipping option (only one) and then click continue I get a white screen. In my apache error log this is what I get. PHP Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in store/includes/functions/compatibility.php:18) in store/includes/functions/compatibility.php on line 30, referer: https:/store/checkout_shipping.php Any ideas of what the problem is? I did not have the problem until I installed the coupon module. I disable it, but still have the problem. There should not be any problem with the checkout_shipping.php because it is not edited for this module. Quote Link to comment Share on other sites More sharing options...
newtech Posted October 10, 2007 Author Share Posted October 10, 2007 I really need help on this. Anybody point me in right direction to find problem. I have oinstalled the discount coupon codes contrib. When I go to checkout, choose shipping option (only one) and then click continue I get a white screen. In my apache error log this is what I get. PHP Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in store/includes/functions/compatibility.php:18) in store/includes/functions/compatibility.php on line 30, referer: https:/store/checkout_shipping.php Any ideas of what the problem is? I did not have the problem until I installed the coupon module. I disable it, but still have the problem. There should not be any problem with the checkout_shipping.php because it is not edited for this module. Quote Link to comment Share on other sites More sharing options...
newtech Posted October 19, 2007 Author Share Posted October 19, 2007 Still looking for help on this. I really need help on this. Anybody point me in right direction to find problem. I have installed the discount coupon codes contrib. When I go to checkout, choose shipping option (only one) and then click continue I get a white screen. In my apache error log this is what I get. Any ideas of what the problem is? I did not have the problem until I installed the coupon module. I disable it, but still have the problem. There should not be any problem with the checkout_shipping.php because it is not edited for this module. Quote Link to comment Share on other sites More sharing options...
germ Posted October 20, 2007 Share Posted October 20, 2007 Normally, the "Cannot redeclare..." is due to an "include" or "require" of a file (in the case it looks like compatibility.php) being done more than once. You should look thru the code and see if that's what's happening. There is no "magic bullet" I can offer... :blush: If you can't find it, I can point you to a post where I helped someone else solve a similar issue, but it requires downloading/installing a (free) program to help you search your files (that also requires the source files from your site reside on your local PC). Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
newtech Posted October 22, 2007 Author Share Posted October 22, 2007 Normally, the "Cannot redeclare..." is due to an "include" or "require" of a file (in the case it looks like compatibility.php) being done more than once. What is the exact phrase I would be looking for? It has to be something within the contrib (edits I have done) because store worked find before contrib). If you can't find it, I can point you to a post where I helped someone else solve a similar issue, but it requires downloading/installing a (free) program to help you search your files (that also requires the source files from your site reside on your local PC). Please point me to this post. Quote Link to comment Share on other sites More sharing options...
germ Posted October 22, 2007 Share Posted October 22, 2007 This is similar: Click me Except I think you want to search for compatibility.php and find where it's being "required" or "included". I think you'll find it twice along the file path of requires and includes in checkout_shipping.php Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
germ Posted October 22, 2007 Share Posted October 22, 2007 On my site, the only place compatibility.php is referenced is in application_top.php Don't know if that helps or not... :unsure: Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
newtech Posted October 23, 2007 Author Share Posted October 23, 2007 On my site, the only place compatibility.php is referenced is in application_top.php Don't know if that helps or not... :unsure: This is making no sense to me. I also can only find the reference to compatibility.php in application_top.php. Again here is the fatal error I am getting: PHP Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in store/includes/functions/compatibility.php:18) in store/includes/functions/compatibility.php on line 30, referer: https:/store/checkout_shipping.php so the fatal error is coming from checkout_shipping.php. And checkout_shipping.php does not reference compatibility.php anywhere. For kicks I removed the compatibility.php reference in application_top.php. When doing this, I now get the following error: PHP Fatal error: Cannot redeclare tep_db_connect() (previously declared in /store/includes/functions/database.php:13) in /store/includes/functions/database.php on line 25, referer: https://store/checkout_shipping.php Quote Link to comment Share on other sites More sharing options...
newtech Posted October 23, 2007 Author Share Posted October 23, 2007 Would it not make sense that if the referrer is: referer: https:/store/checkout_shipping.php that the problem would be with checkout_shipping.php? When I replace it with the original checkout_chipping.php I get the same error messages. How can this be? Quote Link to comment Share on other sites More sharing options...
newtech Posted October 23, 2007 Author Share Posted October 23, 2007 OK. I am absolutely stumped. I know for sure that the store was working properly before the coupon contrib. I have just replaced the files that were edited for the the coupon contrib, yet I still get the same error messages. What in the world could be causing the PHP Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in store/includes/functions/compatibility.php:18) in store/includes/functions/compatibility.php on line 30, referer: https:/store/checkout_shipping.php Quote Link to comment Share on other sites More sharing options...
germ Posted October 23, 2007 Share Posted October 23, 2007 Look in /store/includes/functions/compatibility.php to see if do_magic_quotes_gpc() is defined as a function more than once. :unsure: Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
newtech Posted October 23, 2007 Author Share Posted October 23, 2007 Look in /store/includes/functions/compatibility.php to see if do_magic_quotes_gpc() is defined as a function more than once.:unsure: I have never touched compatibility.php so it should be fine, but I am open to ANY suggestion. I checked compatibility.php and here is what it has: // handle magic_quotes_gpc turned off. if (!get_magic_quotes_gpc()) { do_magic_quotes_gpc($HTTP_GET_VARS); do_magic_quotes_gpc($HTTP_POST_VARS); do_magic_quotes_gpc($HTTP_COOKIE_VARS); } And this is not repeated anywhere else. I have tested a default store at another location on my server and the order entry is working properly, including the PayPal IPN. So, I would have to assume that it is something with the coupon contrib since the last contrib I did prior to it was the PayPal IPN and it was working. However, as far as I can tell I have all the coupon edited files back to where they were prior to adding the contrib. I am going to install the contrib on the default store to see if I can duplicate the symptom. Any other suggestions would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
newtech Posted October 23, 2007 Author Share Posted October 23, 2007 I am still at a total lose. I deleted any files that were changed based upon the coupon contrib. I then uploaded the default files. I still get the same error message. It cannot be any other contrib I have installed because all the other contribs I use have nothing to do with any checkout process whatsoever and that is the only process where I have any errors. Plus I did not have any problems until I installed the coupon contrib. It cannot be a database issue because I am using the same database for the default store. It appears my only solution is to start with my other default store and add all the contribs I have. Any other suggestions would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
germ Posted October 23, 2007 Share Posted October 23, 2007 I found this: Click Me :unsure: Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
newtech Posted October 23, 2007 Author Share Posted October 23, 2007 I found this: Click Me :unsure: It looked so hopeful, but no go. The catalog/admin/includes/functions/compatibility.php already had the suggested edit. I did the suggested edit in catalog/includes/functions/compatibility.php BUT still have the same error message. Thanks for finding this though. Quote Link to comment Share on other sites More sharing options...
germ Posted October 23, 2007 Share Posted October 23, 2007 Can you post a link to your site, or send it to me via PM, so I can see what's going on for myself? :unsure: Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
newtech Posted October 23, 2007 Author Share Posted October 23, 2007 Can you post a link to your site, or send it to me via PM, so I can see what's going on for myself?:unsure: I have PM you with URL, username, and password to login as a test customer. Quote Link to comment Share on other sites More sharing options...
germ Posted October 24, 2007 Share Posted October 24, 2007 I don't know if I've found out much... :unsure: I found out your "Logout" doesn't work either. It returns a blank page. You might check the server logs to see why that bombs. The only commonality the checkout_shipping and logout have are in application_top This may be grasping at straws, but in your copy of application_top.php change this line: require(DIR_WS_FUNCTIONS . 'compatibility.php'); To: require_once(DIR_WS_FUNCTIONS . 'compatibility.php'); And see if anything more promising appears.... :unsure: Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
newtech Posted October 24, 2007 Author Share Posted October 24, 2007 I don't know if I've found out much...:unsure: I found out your "Logout" doesn't work either. It returns a blank page. You might check the server logs to see why that bombs. The only commonality the checkout_shipping and logout have are in application_top This may be grasping at straws, but in your copy of application_top.php change this line: require(DIR_WS_FUNCTIONS . 'compatibility.php'); To: require_once(DIR_WS_FUNCTIONS . 'compatibility.php'); And see if anything more promising appears.... :unsure: Without the suggested edit of application_top.php, I get the same error message for the logout. If I edit the application_top.php I get: PHP Fatal error: Cannot redeclare tep_db_connect() (previously declared in /store/includes/functions/database.php:13) in /store/includes/functions/database.php on line 25, referer: /store/index.php. So no fix yet, but I am going to explore the application_top.php concept. Quote Link to comment Share on other sites More sharing options...
germ Posted October 24, 2007 Share Posted October 24, 2007 Just for grins and giggles, in application_top change all: require to require_once And all: include to: include_once Maybe do them one at a time, then access the known "problem pages" and see what happens? :unsure: Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
newtech Posted October 24, 2007 Author Share Posted October 24, 2007 Just for grins and giggles, in application_top change all: require to require_once And all: include to: include_once Maybe do them one at a time, then access the known "problem pages" and see what happens? :unsure: I did the above, but still get one fatal error: PHP Fatal error: Cannot redeclare class order in /store/includes/classes/order.php on line 13, referer: store/checkout_shipping.php order.php is nowhere to be found in the application_top.php. So no idea how to resolve this. I have tried the original application_top.php file with no luck. I am just going to have to go to a default store and reinstall all of the contribs. I have done several stores and have never had to go back to a default store. Only had to remove the contrib that caused problems. Oh, Well. Thanks for helping. Quote Link to comment Share on other sites More sharing options...
mikevanbibber Posted March 27, 2009 Share Posted March 27, 2009 Dear Newtech, I found your post while searching for a solution for my problem of "Fatal error ...redeclare magic quotes..." Were you able to solve it? Or, did you have to start over. Mike Quote Mike VanBibber Email me Link to comment Share on other sites More sharing options...
wolfy Posted June 26, 2009 Share Posted June 26, 2009 I have oinstalled the discount coupon codes contrib. When I go to checkout, choose shipping option (only one) and then click continue I get a white screen. In my apache error log this is what I get. Any ideas of what the problem is? I did not have the problem until I installed the coupon module. I disable it, but still have the problem. There should not be any problem with the checkout_shipping.php because it is not edited for this module. For each file in the catalog folder there is generally a corresponding file in the catalog/includes/languages/english/ folder. The english folder generally holds the files used to define all the text which appears on the page. Now when you get the error message : PHP Fatal error: Cannot redeclare tep_db_connect() (previously declared in /store/includes/functions/database.php:13) in /store/includes/functions/database.php on line 25, referer: /store/index.php. or Fatal error ...redeclare magic quotes... or PHP Fatal error: Cannot redeclare class order in /store/includes/classes/order.php on line 13, referer: store/checkout_shipping.php generally I have found that it is probably because you uploaded the 'checkout_shipping.php' file which should be in the catalog folder to the english folder. Always check the files in the English folder first before fiddling with the compatability and other files first. wolfy 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.