CodeIgniter Forums
Please solve My error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Please solve My error (/showthread.php?tid=53164)

Pages: 1 2


Please solve My error - El Forum - 07-13-2012

[eluser]Harish[/eluser]
Hi all,
i got error when i upload my whole pages on the server.
following error occur:
1. Unable to locate the model you have specified: clientmodel

please solve this issue.


Please solve My error - El Forum - 07-13-2012

[eluser]InsiteFX[/eluser]
The error is telling you that it cannot find a model with that name.

When uploading to a live server make sure you upload with the option to have all filename lowercase, some web servers are case sensitive.

Check your model directory and see if that model is in there.



Please solve My error - El Forum - 07-13-2012

[eluser]Harish[/eluser]
It can be work on the local server


Please solve My error - El Forum - 07-13-2012

[eluser]InsiteFX[/eluser]
Did you set your config base_url to the new web sites url?



Please solve My error - El Forum - 07-13-2012

[eluser]Harish[/eluser]
pls check
www.creatortechnology.com/lbt

ya set base_url. login page is opening.


Please solve My error - El Forum - 07-13-2012

[eluser]Harish[/eluser]
I got this error:

1.
A PHP Error was encountered

Severity: Notice

Message: Use of undefined constant client - assumed 'client'

Filename: models/login_model.php

Line Number: 35

2.A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/creatort/public_html/lbt/system/core/Exceptions.php:86)

Filename: helpers/url_helper.php

Line Number: 372

please tell me how to solve this error.


Please solve My error - El Forum - 07-13-2012

[eluser]Nisha S.[/eluser]
It means you have used client instead of $client in your model. Is it?


Please solve My error - El Forum - 07-13-2012

[eluser]Harish[/eluser]
actually client is a controller..


Please solve My error - El Forum - 07-13-2012

[eluser]Nisha S.[/eluser]
Please copy the login model code. Also remove any space before or after php tag to remove the header already sent warning.


Please solve My error - El Forum - 07-13-2012

[eluser]Harish[/eluser]
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/* Author: Jorge Torres
* Description: Login model class
*/
class Login_Model extends CI_Model{
function __construct(){
parent::__construct();
}

public function validate(){
// grab user input
$email = $this->security->xss_clean($this->input->post('email'));
$password = $this->security->xss_clean($this->input->post('password'));

// Prep the query
$this->db->where('email', $email);
$this->db->where('password', $password);

// Run the query
$query = $this->db->get('account');
// Let's check if there are any results
if($query->num_rows == 1)
{
// If there is a user, then create session data
$row = $query->row();
$data = array(
'id' => $row->id,
'usertype' => $row->usertype,
'email' => $row->email,
'validated' => true
);
if($row->usertype==1)
{

redirect(shop);
}

else
{
return false;

}

}

// If the previous process did not validate
// then return false.


}
}
?>

Its model...