hotdiecasttoys Posted July 30, 2011 Posted July 30, 2011 Dear Fellow OSC users, my website is coming up with an error: Warning: Cannot modify header information - headers already sent by (output started at /home4/hotdieca/public_html/includes/languages/english.php:1) in /home4/hotdieca/public_html/includes/functions/general.php on line 45. For some reason I figure out what is wrong. My website, For some reason when I click buy item it leads me to this error. The last modification that I did before it stopped functioning was google analytics. But that was installed unsuccessfully. Can someone please help me. I really appreciate your responses in advance. HDT
hotdiecasttoys Posted July 30, 2011 Author Posted July 30, 2011 Dear Fellow OSC users, my website is coming up with an error: Warning: Cannot modify header information - headers already sent by (output started at /home4/hotdieca/public_html/includes/languages/english.php:1) in /home4/hotdieca/public_html/includes/functions/general.php on line 45. For some reason I figure out what is wrong. My website, For some reason when I click buy item it leads me to this error. The last modification that I did before it stopped functioning was google analytics. But that was installed unsuccessfully. Can someone please help me. I really appreciate your responses in advance. HDT BTW when i checked the location of line 45 there is nothing on there, Should i include the code?
vishalchauhan Posted July 30, 2011 Posted July 30, 2011 Hi Some error occured in your site either in application top page or echo statement remain in application top or configure file check your application top and configure file. Is there any echo statement remain? Is there any statement like it is not completed...like ; missing braces missing something like that.. Please take backup of your files before do changes suggested by me
germ Posted July 30, 2011 Posted July 30, 2011 Click the "Headers already sent..." link in my signature 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 >
MrPhil Posted July 30, 2011 Posted July 30, 2011 The error message tells you that the file english.php is outputting something (at line 1) too early. Check for code left by a hacker at the beginning of that file. If it looks clean, see if there are any blanks, spaces, tabs, or other stuff before the opening <?php. Remove anythng found. Note: if you work in UTF-8, make sure your editor does not save a "Byte Order Mark" in the file.
hotdiecasttoys Posted July 30, 2011 Author Posted July 30, 2011 Thank you everyone for your responses. Click the "Headers already sent..." link in my signature Dear Jim, I ran Headsent.php and i got this O/S = Linux. /home4/hotdieca/public_html/includes/languages/english.php has 250 lines. The PHP start tag is on line 1. The PHP end tag is on line 250. Contents from start of file to the PHP start tag: [EF][bB][bF]<?php[0A] ------------------------- Contents from PHP end tag to end of file: ?> Error Messages: The opening PHP tag is not at the start of the first line in the file. ------------------------- Extended contents of the requested line [1] are: [EF][bB][bF]<?php[0A] ------------------------- Raw contents of the requested line [1] are:  Does this mean my shop was hacked or was it because i saved in UTF-8 format with the BOM? How would I fix this problem and prevent this from happening again? I am new to os commerce and was not sure if I needed to purchase some extra security measures like site lock or purchase an SSL (even though my cc transactions are processed through paypal) Thank you for your response in advance. HDT
germ Posted July 30, 2011 Posted July 30, 2011 No - not hacked. Take Mr Phil's advice - If you use UTF-8 save with no BOM. 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 >
hotdiecasttoys Posted July 30, 2011 Author Posted July 30, 2011 The top of my english.php file as follows: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2007 osCommerce Released under the GNU General Public License */ // look in your $PATH_LOCALE/locale directory for available locales // or type locale -a on the server. // Examples: // on RedHat try 'en_US' // on FreeBSD try 'en_US.ISO_8859-1' // on Windows try 'en', or 'English' @setlocale(LC_TIME, 'en_US.ISO_8859-1'); define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'm/d/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); define('JQUERY_DATEPICKER_I18N_CODE', ''); // leave empty for en_US; see http://jqueryui.com/demos/datepicker/#localization define('JQUERY_DATEPICKER_FORMAT', 'mm/dd/yy'); // see http://docs.jquery.com/UI/Datepicker/formatDate //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } } // if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language) define('LANGUAGE_CURRENCY', 'USD'); // Global entries for the <html> tag define('HTML_PARAMS', 'dir="ltr" lang="en"');
hotdiecasttoys Posted July 30, 2011 Author Posted July 30, 2011 I am currently editing my code using a code editor provided by my host, there are many different formats which i can choose from such as ansi_x3.110-1983. Is that okay to use? How am I able to fix this current problem because I cannot find any empty spaces in the front of the php file
germ Posted July 30, 2011 Posted July 30, 2011 The file has the BOM at the top which you can't see in most editors, but my contribution clearly shows. I'm not "up" on all the formats. You need one with no BOM. 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 >
hotdiecasttoys Posted July 30, 2011 Author Posted July 30, 2011 The file has the BOM at the top which you can't see in most editors, but my contribution clearly shows. I'm not "up" on all the formats. You need one with no BOM. Dear Jim, Thank you for your prompt response I really appreciate your help. I will try to find a way to fix this problem. If it does not work should I import a fresh copy of the english.php file? Tommy
MrPhil Posted July 31, 2011 Posted July 31, 2011 See if your editor has a setting to "save without Byte Order Mark". Any decent editor should. If not, you'll either have to find an editor that ignores BOMs, or change your system encoding from UTF-8 to, say, Latin-1 or Windows-1252. Either way you should see the BOM in the editor and can remove it.
satish Posted July 31, 2011 Posted July 31, 2011 Warning: Cannot modify header information - headers already sent by (output started at /*******/*******/public_html/includes/languages/english.php:1) First : do not display your full path you might face some hacking problems. Now coming to your issue: This generally happens if some special characters are getting appended to your starting <?php tag. This will happen if you are using some editors that are not meant for PHP related developement. So you need use proper editor and remove these special character by going to that file and deleting <? and special char(invisble) and then placing back <?php tag Satish 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.
Sickboards Posted October 17, 2011 Posted October 17, 2011 for me the solution was emptying the sessions table. My problem occurred when I imported a new database on my local machine (XAMPP 1.7) after this I got the Warning: Cannot modify header information - headers already sent by (output started at /*******/*******/public_html/includes/admin/languages/english.php:1) after logging in to the admin cleaning the sessions table did the trick
Recommended Posts
Archived
This topic is now archived and is closed to further replies.