vincej Posted November 27, 2012 Share Posted November 27, 2012 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 ! Quote Link to comment https://forums.phpfreaks.com/topic/271223-need-help-premature-end-of-script-headers-indexphp/ Share on other sites More sharing options...
requinix Posted November 27, 2012 Share Posted November 27, 2012 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? Quote Link to comment https://forums.phpfreaks.com/topic/271223-need-help-premature-end-of-script-headers-indexphp/#findComment-1395404 Share on other sites More sharing options...
vincej Posted November 27, 2012 Author Share Posted November 27, 2012 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 ! Quote Link to comment https://forums.phpfreaks.com/topic/271223-need-help-premature-end-of-script-headers-indexphp/#findComment-1395609 Share on other sites More sharing options...
requinix Posted November 27, 2012 Share Posted November 27, 2012 I'll rephrase. Has this code ever run correctly on the live server? If so, when did it stop and did anything change (on the live server) around that time? Quote Link to comment https://forums.phpfreaks.com/topic/271223-need-help-premature-end-of-script-headers-indexphp/#findComment-1395695 Share on other sites More sharing options...
vincej Posted November 27, 2012 Author Share Posted November 27, 2012 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 ? Quote Link to comment https://forums.phpfreaks.com/topic/271223-need-help-premature-end-of-script-headers-indexphp/#findComment-1395717 Share on other sites More sharing options...
requinix Posted November 27, 2012 Share Posted November 27, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/271223-need-help-premature-end-of-script-headers-indexphp/#findComment-1395723 Share on other sites More sharing options...
vincej Posted November 28, 2012 Author Share Posted November 28, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/271223-need-help-premature-end-of-script-headers-indexphp/#findComment-1395782 Share on other sites More sharing options...
requinix Posted November 28, 2012 Share Posted November 28, 2012 Well, what was the change? Quote Link to comment https://forums.phpfreaks.com/topic/271223-need-help-premature-end-of-script-headers-indexphp/#findComment-1395806 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.