Welcome Guest, Not a member yet? Register   Sign In
Premature end of script headers
#1

[eluser]SeasonedCoder[/eluser]
Whenever I execute this controller:

Code:
function index()
{
   $data = array ();
   $data['title'] = 'Malls';
   $data['body_id'] = 'malls';
   $this->load->view('malls/index', $data);
}

I get 500 Internal Server Error. I looked up the message:

Code:
[Mon May 18 07:05:52 2009] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers:
/path/to/folder/cgi-bin/php-cgi

Now, if I comment the last line in the body:

Code:
function index()
{
   $data = array ();
   $data['title'] = 'Malls';
   $data['body_id'] = 'malls';
   //$this->load->view('malls/index', $data);
}

the page loads ok (of course, it's blank)

I have been struggling with the issue for a couple of hours now. But still cannot find a solution.

Any ideas on how to fix it are highly appreciated.
#2

[eluser]Dam1an[/eluser]
Is this the latest version o CI? PHP4 or 5?
Does it work with a clean install and the welcome controller?
#3

[eluser]SeasonedCoder[/eluser]
Howdy Dam1an, thanks for your reply.

Well, I'm trying to migrate my site from my local server to the remote one.

The weird thing is that some controllers work perfectly, but some, like this, give this error.

I've just checked PHP configuration -- it's version 4.4.9 in CGI/FastCGI mode.
#4

[eluser]Dam1an[/eluser]
Are you loading any extra libraries/helpers/models in this controller which you don't use in the ones that work? That might help narrow the cause
#5

[eluser]SeasonedCoder[/eluser]
Code:
function Malls()
    {
        parent::Controller();
        $this->load->helper(array ('url', 'language', 'form'));
        $this->lang->load('malls', 'russian');
        $this->load->model('mall');
    }
#6

[eluser]Dam1an[/eluser]
Do you use the malls model and mall russian language file in any other controllers?
Try commenting out those 2 loads and call a function 9which doesn;t make use of them)... see if the problem goes away
#7

[eluser]SeasonedCoder[/eluser]
Ok, will keep experimenting with it....
#8

[eluser]Thorpe Obazee[/eluser]
You can also try uploading the files again. I got a few problems before wherein the files weren't uploaded fully. I just don't know if it's the case with yours.
#9

[eluser]SeasonedCoder[/eluser]
I'm still having this problem. I re-uploaded everything -- It doesn't seem to help.
#10

[eluser]Dam1an[/eluser]
Have you tried removing some of the loads as I suggested earlier to narrow the cause?




Theme © iAndrew 2016 - Forum software by © MyBB