[eluser]ChrisD[/eluser]
Hello,
Been fighting with a problem for a couple days now and cannot figure out what's wrong. I've managed to narrow it down to my logs model as the error no longer occurs if I comment out the load call for that model. Error logs are only showing this:
Quote:[Wed Apr 25 12:29:53 2012] [warn] [client xxx.xxx.xxx.xxx] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Wed Apr 25 12:29:53 2012] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: ci_index.php
I only just started the logs model so it only has one function at the moment:
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* Logs
*
* Model for logging user actions
*
*/
class Logs extends CI_Model
{
function __construct()
{
parent::__construct();
$this->load->model('users');
}
/**
* Input password change for user into log
*
* Requires - User ID as string
* Returns - NULL
*/
function password_change($user_id)
{
//check valid user ID
if($this->users->is_valid_uid($user_id))
{
//User ID is valid, setup query
$c_date = date("Y-m-d H:i:s");
$this->db->set('Member',$user_id);
$this->db->set('Date',$c_date);
$this->db->set('UpdatedBy',$user_id);
$this->db->set('UpdatedByIP','123');
$this->db->insert('wcc_logs_password_change');
}
}
}
/* End of file logs.php */
/* Location: ./application/models/logs.php */
Anyone see what's wrong with the code?