Search code examples
phpapachecodeigniter-2apache2.2

500 internal server error after updating Apache httpd to 2.2.24


We are working on a project which is build upon Codeigniter 2. All was working great untill we updated the Apache httpd from 2.2.21 to 2.2.24. The PHP version is still the same (5.3.25).

For building views we use the Template library from Phil Sturgeon.

A controller function could look something like this:

public function index(){
    if($this->_is_logged && $this->_is_super){
        redirect('/start', 'refresh');
    }else{
        $this->template
            ->set_partial('page_header', 'web/template/page_header',$this->data)
            ->set_partial('page_footer', 'web/template/page_footer')
            ->set_partial('page_notifications', 'web/template/notification_view',$this->data)
            ->set_layout('minimum')
            ->build('start/authenticate_view');
    }
}

After the update this causes a 500 Internal server error ... However, when adding an echo before the ifstatement like this:

public function index(){
    echo $this->_is_logged.' '.$this->_is_super.' -- test --'.$this->data;
    if($this->_is_logged && $this->_is_super){
        redirect('/start', 'refresh');
    }else{
        $this->template
            ->set_partial('page_header', 'web/template/page_header',$this->data)
            ->set_partial('page_footer', 'web/template/page_footer')
            ->set_partial('page_notifications', 'web/template/notification_view',$this->data)
            ->set_layout('minimum')
            ->build('start/authenticate_view');
    }
}

The page gets build as it should with the values from the echo at the top of the page.

We allready downgraded the Apache httpd to 2.2.21 and everything worked again without changing any code. So we are sure it has something to do with the Apache version. Maybe it has to do with code used in the Template library, or some strange other thing... ?

We are running up against the walls on this one.

Is there anyone who had the same issue, knows what the problem might be, ... You would be our hero forever :)

Additional info:

  • We use DataMapper ORM for CI models
  • cPanel-version: 11.36.1 (build 6)
  • OS Linux

Solution

  • We found the problem. There was a forgotten Library we had used in an early state of the project to log messages and data in FirePhp.
    Removing this file and a call to one of his functions in our base controller solved the internal server error.