osCmax v2.5 User Manual
Results 1 to 8 of 8

Warning: Cannot modify header information - Pls Help!!

This is a discussion on Warning: Cannot modify header information - Pls Help!! within the osCMax v1.7 Installation forums, part of the osCmax v1.7 Forums category; Hi all, After playing successfully offline on a local machine running a copy of MS2-Max-1.7 & XAMMP (all in one ...

      
  1. #1
    Lurker
    Join Date
    Apr 2005
    Posts
    4
    Rep Power
    0


    Default Warning: Cannot modify header information - Pls Help!!

    Hi all,

    After playing successfully offline on a local machine running a copy of MS2-Max-1.7 & XAMMP (all in one apache server) I decided to upload and install a clean copy to my Web-Host.

    Everything was going great (thanks to the useful information in this forum & the great osCDox Guide). However when I now select 'My Account' or 'Checkout' functions from the 'Catalog' page I get the following error message:

    Warning: Cannot modify header information - headers already sent by (output started at /home/linuxman/public_html/catalog/includes/languages/english.php:360) in /home/linuxman/public_html/catalog/includes/functions/general.php on line 29

    I've not really modified much at all yet, only followed along with the installation guide and changed a few preferences from within Admin. Everything seemed to be going great, that was until I tried testing from a customers point of veiw.

    I'd be really grateful if someone could help me out.

    Many thanks in advance,

    Andy

  2. #2
    New Member Jonnyboy's Avatar
    Join Date
    May 2005
    Location
    Cambridge England
    Posts
    22
    Rep Power
    0


    Default RE: Warning: Cannot modify header information - Pls Help!!

    Hi Andy

    Have you made any cahnge to the /catalog/includes/languages/english.php file?
    If you have can you post it here so we can check it out for you

    Thanks
    John

  3. #3
    Lurker
    Join Date
    Apr 2005
    Posts
    4
    Rep Power
    0


    Default

    Hi John,

    The only changes I've made to that file are to the Page Title:

    // page title
    define('TITLE', 'Linux-man Distros');

    I've also changed this in the Catalog/includes/languages/english/index.php: define('HEADING_TITLE', 'Linux for Everyone!!');
    so the Catalog page no longer displays 'Welcome to AAbox.com'

    Other changes I've done have been through the Admin page, such as set the default curr to GBP and removed USD, Removed German, Spannish languages, and changed the permission on various files as directed by the installtion guide. Also through Admin I've changed the default template to osC.

    That's it really. Unfortunately I don't know if the Account & Checkout function have ever worked as this is the first time I checked them.

    Anything you can suggest would be appreciated. I really hope I can sort this out as the installation went like a dream.

  4. #4
    New Member Jonnyboy's Avatar
    Join Date
    May 2005
    Location
    Cambridge England
    Posts
    22
    Rep Power
    0


    Default

    I found this when i did a google search... dont know if it will help but its worth a try...

    search
    "Warning: Cannot modify header information - headers already sent by" osc max

    --------------------------------------------------------------------------
    http://sourceforge.net/mailarchive/f...ewmonth=200505
    ------------------------------------------------------------------------------------------

    Warning: Cannot add header information - headers already sent by (output
    started at /directory/to/starting_file.php:XXX) in
    /directory/to/calling_file.php on line XX


    The problem occurs when content has been sent to the client and PHP has been
    instructed to set header parameters via the header() function, or when
    starting the session via the session_start() function.



    Solution



    The problem can be solved by walking through the code logic flow in the files
    involved, which are mentioned in the warning message, to make sure no headers
    are being set after content has been sent to the client.



    A common cause to the problem is spaces ("whitespace") existing before the
    first <?php tag and/or after the last ?> tag with the files involved. By
    removing all spaces so that <?php is at the very start of the file and that ?>
    is at the very end of the file, no content would have been sent to the client
    and headers can be set safely.



    Open the file in a text editor -> place your mouse cursor after the very last
    ?> tag at the very end of the file and press the "delete" key on your computer
    keyboard. Make sure that whitespace does not exist before the opening <?php
    tag at the very beginning of the file - delete whitespace if present. Save and
    upload the file to your installation.

  5. #5
    Lurker
    Join Date
    Apr 2005
    Posts
    4
    Rep Power
    0


    Default

    Thanks for finding that. Unfortunately it didn't fixed my problem. Still getting the same error. I haven't really changed that much from the default install so I'm totally stumpt.

  6. #6
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default

    /home/linuxman/public_html/catalog/includes/languages/english.php:360
    That tells you exactly what the problem is. On line 360, you have white space after the closing php tag. Remove it and the error goes away. This is a php newbie error. Happens to everyone at least once...
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  7. #7
    Lurker
    Join Date
    Apr 2005
    Posts
    4
    Rep Power
    0


    Default

    I checked all the files and couldn't find any spaces, went back and double checked and found loads!!!

    It's all working now which is a real relief. So thanks everyone.

    But one question, how did the spaces get there?? I've edited a number of these files, but so far all my edits haven't been anywhere near the closing php tags!!

    Is it something to do with fact I'm editing these files directly on the server using my webhosts cPanelX control panel, or something else.

    Once again many thanks for taking the time to sort this out for me

    Andy

  8. #8
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default

    It is because you are using a crappy editor that was not meant to edit code. The CPANEL web editor is not for anything other than wrecking your files

    Use a real text editor that was meant for editing code (read : does not put any extra garbage into your files!)
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

Similar Threads

  1. Warning: Cannot modify header information - headers (...)
    By grosnombril in forum osCommerce 2.2 Installation Help
    Replies: 6
    Last Post: 02-08-2005, 12:04 AM
  2. Modify this...
    By tonic in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 01-11-2005, 07:19 AM
  3. paypal ipn can't modify header information
    By battleaxe in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 06-06-2004, 11:58 AM
  4. header / header.php top logo problem
    By the_error_king in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 04-05-2004, 05:02 PM
  5. Warning: Cannot add header information
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 3
    Last Post: 11-28-2003, 03:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •