Azure Moon Posted September 30, 2009 Posted September 30, 2009 Hi Everyone! It has been a couple of weeks since I received an order through my web site and I just figured it was due to the bad economy. So today I tried to place a test order and when I clicked on the "Add to cart" button to add an item to the shopping cart I got the following error message: Warning: Cannot modify header information - headers already sent by (output started at /home/azureX/public_html/includes/languages/english.php:395) in /home/azureX/public_html/includes/functions/general.php on line 29 I also discovered that the security code/v v c code that visitors have to enter when they want to contact us or create an account is not working either. Where it usually shows the jumbled code that they need to enter, there is only a red X in a white box. I didn't install this feature and I haven't been able to reach the person that did, so I have no idea what the problem may be or how to fix it. Now I am basically a newbie when it comes to this stuff, but I did look at the public_html/includes/languages/english.php file and noticed the following on line 8: Copyright � 2003 osCommerce And in that same file starting at line 181 there are 7 \n 's added to the following lines: // javascript messages define('JS_ERROR', 'Errors have occured during the process of your form.\n\nPlease make the following corrections:\n\n'); define('JS_REVIEW_TEXT', '* The \'Review Text\' must have at least ' . REVIEW_TEXT_MIN_LENGTH . ' characters.\n'); define('JS_REVIEW_RATING', '* You must rate the product for your review.\n'); define('JS_ERROR_NO_PAYMENT_MODULE_SELECTED', '* Please select a payment method for your order.\n'); Now I'm assuming that the � on line 8 with the copyright should be © and the 7 \n 's should not be there, but I don't have a clue how they would have got there if I haven't done anything to that file. Here are lines 1 through 40 of the public_html/includes/functions/general.php file: <?php /* $Id: general.php,v 1.231 2003/07/09 01:15:48 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ //// // Stop from parsing any further PHP code function tep_exit() { tep_session_close(); exit(); } //// // Redirect to another page or site function tep_redirect($url) { if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url $url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL } } header('Location: ' . $url); tep_exit(); } //// // Parse the data used in the html tags to ensure the tags will not break function tep_parse_input_field_data($data, $parse) { return strtr(trim($data), $parse); } I don't understand why this has happened because I have not made any changes to any file and I am the only person with access to my admin, so how would anything have changed if I didn't do it? I am hoping that one of the wonderful and much smarter than I osCommerce gurus can shed some light on this so I can get my site back up and running again and actually receive orders again. Any and all help will be greatly appreciated. Brightest Blessings, Azure Moon
germ Posted September 30, 2009 Posted September 30, 2009 Warning: Cannot modify header information - headers already sent by (output started at /home/azureX/public_html/includes/languages/english.php:395) in /home/azureX/public_html/includes/functions/general.php on line 29 Try deleting the closing PHP tag AT THE BOTTOM OF THE FILE: ?> (In /includes/languages/english.php ) 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 >
Azure Moon Posted September 30, 2009 Author Posted September 30, 2009 Try deleting the closing PHP tag AT THE BOTTOM OF THE FILE: ?> (In /includes/languages/english.php ) Hi Germ! Thank you for your quick reply : ) Excuse my ignorance, but ?> is at the end of every file I've looked at, so shouldn't that stay at very end of the english.php file? What about all the other things I quoted? Please advise. Brightest Blessings, Azure Moon
germ Posted September 30, 2009 Posted September 30, 2009 It doesn't have to be there so taking it away can't hurt anything. It may not help but it will not hurt. I won't be any help with your other problems. Sorry... :blush: 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 >
Azure Moon Posted September 30, 2009 Author Posted September 30, 2009 It doesn't have to be there so taking it away can't hurt anything. It may not help but it will not hurt. I won't be any help with your other problems. Sorry... :blush: OMG Germ - it worked!!! I am sooooo sorry that I doubted you my wonderful and much smarter than I osCommerce guru!!! Again, I wish I could down load your brain...LOL! Thank you again Jim - you RULE!!! You have saved what was left of my sanity!! If I wasn't already taken, I'd ask you to marry me...LOL!!! I am still puzzled however by the � on line 8 and those 7 \n 's on line 181 of the english.php file. Hopefully another wonderful and much smarter than I osCommerce guru will be able to advise me if they should be changed/removed. Again, any and all help will be greatly appreciated. Brightest Blessings, Dawn aka Azure Moon
germ Posted September 30, 2009 Posted September 30, 2009 The lines in question should look like this: // javascript messages define('JS_ERROR', 'Errors have occured during the process of your form.\n\nPlease make the following corrections:\n\n'); define('JS_REVIEW_TEXT', '* The \'Review Text\' must have at least ' . REVIEW_TEXT_MIN_LENGTH . ' characters.\n'); define('JS_REVIEW_RATING', '* You must rate the product for your review.\n'); define('JS_ERROR_NO_PAYMENT_MODULE_SELECTED', '* Please select a payment method for your order.\n'); define('JS_ERROR_SUBMITTED', 'This form has already been submitted. Please press Ok and wait for this process to be completed.'); define('ERROR_NO_PAYMENT_MODULE_SELECTED', 'Please select a payment method for your order.'); If removing the closing PHP tag fixed the problem that means there were "whitespaces" at the end of the file. Headers Already Sent Click the link above for an explanation. Although if you didn't edit the file it doesn't explain HOW they got there... :unsure: And as for "downloading my brain".... FIRST you'll need a pair of tweezers and a magnifying glass to even find it... THEN a THIMBLE will be MORE than sufficient to hold it's contents I'm sure.... :o (P.S. - You wouldn't like it after you got it... Trust me on this one. I have to live with it every day :blush: ) 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 >
Azure Moon Posted September 30, 2009 Author Posted September 30, 2009 The lines in question should look like this: // javascript messages define('JS_ERROR', 'Errors have occured during the process of your form.\n\nPlease make the following corrections:\n\n'); define('JS_REVIEW_TEXT', '* The \'Review Text\' must have at least ' . REVIEW_TEXT_MIN_LENGTH . ' characters.\n'); define('JS_REVIEW_RATING', '* You must rate the product for your review.\n'); define('JS_ERROR_NO_PAYMENT_MODULE_SELECTED', '* Please select a payment method for your order.\n'); define('JS_ERROR_SUBMITTED', 'This form has already been submitted. Please press Ok and wait for this process to be completed.'); define('ERROR_NO_PAYMENT_MODULE_SELECTED', 'Please select a payment method for your order.'); If removing the closing PHP tag fixed the problem that means there were "whitespaces" at the end of the file. Headers Already Sent Click the link above for an explanation. Although if you didn't edit the file it doesn't explain HOW they got there... :unsure: And as for "downloading my brain".... FIRST you'll need a pair of tweezers and a magnifying glass to even find it... THEN a THIMBLE will be MORE than sufficient to hold it's contents I'm sure.... :o (P.S. - You wouldn't like it after you got it... Trust me on this one. I have to live with it every day :blush: ) Hi Jim, The lines in question that you said should "look like this" do indeed match what I have, so that's good news! How anything got changed is yet another unexplained phenomenon to add to my ongoing list...LOL! And don't be so hard on yourself Jim - if I'd need a pair of tweezers, magnifying glass and thimble to find and hold the contents of your brain, I shutter to think how tiny things would have to be to find and hold mine...LOL! Seriously though, thanks again for all of your help and saving my sanity - YOU RULE! Brightest Blessings, Dawn aka Azure Moon
satish Posted September 30, 2009 Posted September 30, 2009 Some times while editing or uploading white spaces come in the files. make sure You use a proper editor. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.