I need your help!! When I load the migration library in codeigniter return a Error 500 and a blank page but if I don't load the library my app works
var_dump("foo1"); //print this line
$this->load->library('migration');
var_dump("foo2"); //not print this line
$this->migration->version(1);
I have the var_dumps because I wanted know where are the error, not print "foo2" so I supposed that error is in $this->load->library('migration');
The library is in /system/libraries/Migration.php
migrations are enabled in /application/config/migration.php $config['migration_enabled'] = TRUE; the version is $config['migration_version'] = 1; and the path is default $config['migration_path'] = APPPATH . 'migrations/';
I enabled the error logging and shows no errors and also I enabled all error reporting in /idex.php (error_reporting(E_ALL);) and neither show anything
Please help me!
PD: Sorry if my english is not good.
That is controller class
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Home extends CI_Controller {
public function index(){
$this->load->library('migration');
$this->migration->version(1);
$profile='';
$auth = false;
$userdata = array();
if ($this->session->userdata('logged_in') == TRUE ) {
$auth = true;
$user_data = array(
'username'=> $this->session->userdata('username'),
'correo'=> $this->session->userdata('correo'),
'mensaje' => $this->session->userdata('mensaje'),
'profile' => $this->session->userdata('profile'),
'profile_id' => $this->session->userdata('profile_id'),
'result' => $this->session->userdata('result'),
'rut' => $this->session->userdata('rut'),
'logged_in' => $this->session->userdata('logged_in')
);
$userdata = $user_data;
$profile = $this->session->userdata('profile');
}
$data = array('auth' => $auth, 'profile' => $profile, 'userdata'=> $userdata);
$this->load->view('home', $data);
}
}
?>
create tablepermission with your database user. - Iamzozo