The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLUTION FOR ERROR "Premature end of script headers"

Discussion in 'General Discussion' started by minotauro, Jan 21, 2009.

  1. minotauro

    minotauro Well-Known Member

    Joined:
    Jan 19, 2004
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    Hello!

    If your server is showing the error "Premature end of script headers" on any PHP file (only this error) without more details, verify the file "/usr/local/apache/logs/suphp_log" that certain it have 2 GB. To solve the problem, only rename this file to another name or remove it. :)

    Regards,
    Minotauro.
     
  2. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    Or make a file in /etc/logrotate.d
    Like
    nano /etc/logrotate.d/suphp


    I think something like this would work.

    To have it rotate for you.

    Editted: took out line endscript was causing an error when I tested it
     
    #2 rhenderson, Jan 21, 2009
    Last edited: Jan 21, 2009
  3. minotauro

    minotauro Well-Known Member

    Joined:
    Jan 19, 2004
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    Yes, perfect! :D
     
  4. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    Yes it seems to work just fine (it worked with the line endscript in it but it ignored the error - I editted the above post and took it out) when running /etc/cron.daily/logrotate so you will not have to keep and eye on it.
     
  5. Sc-Pro

    Sc-Pro Member

    Joined:
    Apr 29, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Same issue in PHPMyAdmin only tho and don't have SuPHP installed, All tho the 2 GB file of error_log resulted in my issued.
     
  6. Zishan

    Zishan Well-Known Member

    Joined:
    Aug 6, 2005
    Messages:
    104
    Likes Received:
    1
    Trophy Points:
    0
    You can use the cPanel provided log rotation for log files from:

     
Loading...

Share This Page