Jump to content

Need Help: Premature End Of Script Headers Index.php


Recommended Posts

Hi - I have built an application on Codeigniter ( an MVC PHP framework) and out of now where I am getting an Internal Server Error. When I check my Apache logs I get the Premature End of Script Headers index.php

 

I have no experience of this error and have no idea what to do with it. I have spent days trying to make it work. What I find curious is that the "refer" file precedes the actual file which fails. What is also od is that the same code runs flawlessly on my dev. sys.

 

I would include the code but as it is an MVC there are 3 files to make it work. Also I am not sure what to code too include ie the page that fails plus supporting controller & model or the "refer" MVC files ?

 

Many Many thanks !

The "refer" is the referrer, as in the place the user was just before they got to the page in question (such as with a link or form). Needless to say, if you see it's the preceding page then that's good.

 

Has anything changed recently? Or is this the first time you've tried running this code?

Thanks for your comments. Yes things changed, however, the code runs fine on my XAMPP dev sys , but when it goes to the ISP it fails.

 

Can you tell me what I should be looking for ?? I use PHPStorm as my editor and it usually is very good at highlighting errors but there is nothing.

 

I don't even know where to start looking.

 

MANY thanks !

yes - I guess so , bu there was so much stuff going on at that time that I can not figure out what it might have been -

 

Please tell me, should I bee looking at the a page and supporting code for the one that failed or the referer page ?

The page with the error is where you should be looking for the error. Kinda...

 

The cause of "premature end of script headers" errors tend to be either obvious or entirely non-obvious. May have to do with extensions or Apache or security restrictions on the machine or a bug or God knows what else.

The best place to look for the problem would be in whatever changed around the time those errors started showing up.

Thanks !! Your advice caused me to search through my code ...I found a change .. commented it out adn bingo - fixed . Now I have to figure out why that snippet of code caused the failure in the first place.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.