SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2007
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Why am I getting header sent errors???

    I just recently uploaded my site to a hosting company and for every single rediirect I have in my site, I get a "Cannot modify header information - headers already sent by". I'm just confused as to why my site works on my development machine and not on the hosting companies server. Why wouldn't I have gotten those warnings or errors or my development machine?

    If I stick a .htaccess file that hides errors and warnings the pages still won't redirect. Any help is appreciated, thanks.

  2. #2
    SitePoint Enthusiast
    Join Date
    Mar 2007
    Posts
    89
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    make sure there's no whitespace before your <?php tags, and that there's no data sent before using header()

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2007
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just stuck an ob_start() in the header part and an ob_end_flush() in the footer part and it fixed it. It just weird that I never encountered that problem on my test server, which uses identical software. I wonder if they are using some strict setting or something....


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
  •