[eluser]Samus[/eluser]
[quote author="RAH" date="1333990073"]Hi,
I have a project/controller that runs perfect on my local environment, but when I run it online it breaks.
I don't get anything in my logs, I don't get any errors even with error_reporting(E_ALL) and display_errors: 1.
I can echo stuff before and after the class, but the class dosn't run.
What can it be? It works locally so I guess it has to be something with the host.
This project is on a subdomain, and I have another project on the main domain that uses mod_rewrite and works.
Here is my default controller:
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Home extends CI_Controller {
function __construct() {
parent::__construct();
}
function index() {
$this->login();
}
function login($param = "") {
if($param == "connect" && isset($_POST) && !empty($_POST)) {
$user = $_POST['login_user'];
$pass = $_POST['login_pass'];
if(!$this->auth->log_in($user, $pass)) {
//echo "kan ikke logge inn";
}
}
if( $this->auth->logged_in() ) {
redirect("articles");
}else{
$this->load->view("login");
}
}
function logout() {
if($this->auth->log_out()) {
$this->index();
}
}
}
base url is correct, and url_protocol is set to AUTO. I have tried every option in the url_protocol.
Thanks[/quote]
this might sound obvious, but check the uploaded version? could possibly be truncated.
it happened to me before and I noticed all my code was on one line rather than in multiple lines as i uploaded it. which caused all my code to break