Why does CI load Table Library returns error 500 is currently unable to handle this request?
up vote
0
down vote
favorite
So I have this problem for a while now, I already tried to figure it out but I can't found where's the problem. and I already tried to find the solution on the google and forums, but can't found the answer.
I have 2 controllers, let's say Controller A
& Controller B
,
Controller A can call function export_table
without problem, but Controller B cannot call the same function which is export_table
. Controller B returns a HTTP ERROR 500 error, but Controller A just fine and show the data perfectly.
this function contains only
$this->ci->load->library('table');
for troubleshooting only.
But why does this happened?
CI version i'm using is: 3.0.0
Edited:
Even only call
$this->load->library('table');
in Controller B will result a HTTP error 500
Edited:
controller/Report.php
<?php if ( ! defined('BASEPATH') ) exit('No direct script access allowed');
class Report extends CI_Controller{
public function __construct(){
parent::__construct();
}
public function index(){
// Bunch of query and data that returns data into $data
$this->myci->get_report_table($data);
}
}
controller/Inquiries.php
Basically I just copy pasted all of them, and changes the class name from Report
to Inquiries
and removed some unimportant parts
<?php if ( ! defined('BASEPATH') ) exit('No direct script access allowed');
class Inquiries extends CI_Controller{
public function __construct(){
parent::__construct();
}
public function index(){
// Bunch of query and data that returns data into $data
$this->myci->get_report_table($data);
}
}
libraries/Myci.php
<?php if ( ! defined('BASEPATH') ) exit('No direct script access allowed');
class Myci {
var $ci;
private $session, $auth_page, $dashboard;
public $user_role;
function __construct() {
$this->ci =& get_instance();
$this->session = 'logged_in_user';
$this->auth_page = 'auth';
$this->dashboard = '/';
$this->user_role = $this->get_user_role();
$this->ci->load->model('deals');
}
function get_report_table($data){
$this->ci->load->library('table');
// Bunch of codes below
}
}
So the problem is, when Report.php calling get_report_table()
, it's working fine, the table is showing and the data is correct, no problem at all.
but when Inquiries calling get_report_table()
, then HTTP error 500 appear on the Inquiries only. only the load library is making the error, anything else is fine. so I don't know what's wrong, it's never happened before
codeigniter
add a comment |
up vote
0
down vote
favorite
So I have this problem for a while now, I already tried to figure it out but I can't found where's the problem. and I already tried to find the solution on the google and forums, but can't found the answer.
I have 2 controllers, let's say Controller A
& Controller B
,
Controller A can call function export_table
without problem, but Controller B cannot call the same function which is export_table
. Controller B returns a HTTP ERROR 500 error, but Controller A just fine and show the data perfectly.
this function contains only
$this->ci->load->library('table');
for troubleshooting only.
But why does this happened?
CI version i'm using is: 3.0.0
Edited:
Even only call
$this->load->library('table');
in Controller B will result a HTTP error 500
Edited:
controller/Report.php
<?php if ( ! defined('BASEPATH') ) exit('No direct script access allowed');
class Report extends CI_Controller{
public function __construct(){
parent::__construct();
}
public function index(){
// Bunch of query and data that returns data into $data
$this->myci->get_report_table($data);
}
}
controller/Inquiries.php
Basically I just copy pasted all of them, and changes the class name from Report
to Inquiries
and removed some unimportant parts
<?php if ( ! defined('BASEPATH') ) exit('No direct script access allowed');
class Inquiries extends CI_Controller{
public function __construct(){
parent::__construct();
}
public function index(){
// Bunch of query and data that returns data into $data
$this->myci->get_report_table($data);
}
}
libraries/Myci.php
<?php if ( ! defined('BASEPATH') ) exit('No direct script access allowed');
class Myci {
var $ci;
private $session, $auth_page, $dashboard;
public $user_role;
function __construct() {
$this->ci =& get_instance();
$this->session = 'logged_in_user';
$this->auth_page = 'auth';
$this->dashboard = '/';
$this->user_role = $this->get_user_role();
$this->ci->load->model('deals');
}
function get_report_table($data){
$this->ci->load->library('table');
// Bunch of codes below
}
}
So the problem is, when Report.php calling get_report_table()
, it's working fine, the table is showing and the data is correct, no problem at all.
but when Inquiries calling get_report_table()
, then HTTP error 500 appear on the Inquiries only. only the load library is making the error, anything else is fine. so I don't know what's wrong, it's never happened before
codeigniter
Provide more code and I can help but at the moment there isn't enough here to make any guesses even.
– AlunR
Nov 8 at 10:29
Provide structures, acutal controller code etc
– AlunR
Nov 8 at 10:29
@AlunR please check, I already added the codes
– Khrisna Gunanasurya
Nov 8 at 12:07
Not sure it will help, but you should not use$session
for a class property name. Change it to$sess
or something. Using$session
will definitely cause a name collision with the CI "session" library. If you do load the session library the call$this->session = 'logged_in_user';
is going to cause problems.
– DFriend
Nov 8 at 20:40
Hi @DFriend I already rename it tosess
, but the problem still exists, not sure why. Thanks for your tips, I'll keep it in mind :D
– Khrisna Gunanasurya
Nov 9 at 2:51
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
So I have this problem for a while now, I already tried to figure it out but I can't found where's the problem. and I already tried to find the solution on the google and forums, but can't found the answer.
I have 2 controllers, let's say Controller A
& Controller B
,
Controller A can call function export_table
without problem, but Controller B cannot call the same function which is export_table
. Controller B returns a HTTP ERROR 500 error, but Controller A just fine and show the data perfectly.
this function contains only
$this->ci->load->library('table');
for troubleshooting only.
But why does this happened?
CI version i'm using is: 3.0.0
Edited:
Even only call
$this->load->library('table');
in Controller B will result a HTTP error 500
Edited:
controller/Report.php
<?php if ( ! defined('BASEPATH') ) exit('No direct script access allowed');
class Report extends CI_Controller{
public function __construct(){
parent::__construct();
}
public function index(){
// Bunch of query and data that returns data into $data
$this->myci->get_report_table($data);
}
}
controller/Inquiries.php
Basically I just copy pasted all of them, and changes the class name from Report
to Inquiries
and removed some unimportant parts
<?php if ( ! defined('BASEPATH') ) exit('No direct script access allowed');
class Inquiries extends CI_Controller{
public function __construct(){
parent::__construct();
}
public function index(){
// Bunch of query and data that returns data into $data
$this->myci->get_report_table($data);
}
}
libraries/Myci.php
<?php if ( ! defined('BASEPATH') ) exit('No direct script access allowed');
class Myci {
var $ci;
private $session, $auth_page, $dashboard;
public $user_role;
function __construct() {
$this->ci =& get_instance();
$this->session = 'logged_in_user';
$this->auth_page = 'auth';
$this->dashboard = '/';
$this->user_role = $this->get_user_role();
$this->ci->load->model('deals');
}
function get_report_table($data){
$this->ci->load->library('table');
// Bunch of codes below
}
}
So the problem is, when Report.php calling get_report_table()
, it's working fine, the table is showing and the data is correct, no problem at all.
but when Inquiries calling get_report_table()
, then HTTP error 500 appear on the Inquiries only. only the load library is making the error, anything else is fine. so I don't know what's wrong, it's never happened before
codeigniter
So I have this problem for a while now, I already tried to figure it out but I can't found where's the problem. and I already tried to find the solution on the google and forums, but can't found the answer.
I have 2 controllers, let's say Controller A
& Controller B
,
Controller A can call function export_table
without problem, but Controller B cannot call the same function which is export_table
. Controller B returns a HTTP ERROR 500 error, but Controller A just fine and show the data perfectly.
this function contains only
$this->ci->load->library('table');
for troubleshooting only.
But why does this happened?
CI version i'm using is: 3.0.0
Edited:
Even only call
$this->load->library('table');
in Controller B will result a HTTP error 500
Edited:
controller/Report.php
<?php if ( ! defined('BASEPATH') ) exit('No direct script access allowed');
class Report extends CI_Controller{
public function __construct(){
parent::__construct();
}
public function index(){
// Bunch of query and data that returns data into $data
$this->myci->get_report_table($data);
}
}
controller/Inquiries.php
Basically I just copy pasted all of them, and changes the class name from Report
to Inquiries
and removed some unimportant parts
<?php if ( ! defined('BASEPATH') ) exit('No direct script access allowed');
class Inquiries extends CI_Controller{
public function __construct(){
parent::__construct();
}
public function index(){
// Bunch of query and data that returns data into $data
$this->myci->get_report_table($data);
}
}
libraries/Myci.php
<?php if ( ! defined('BASEPATH') ) exit('No direct script access allowed');
class Myci {
var $ci;
private $session, $auth_page, $dashboard;
public $user_role;
function __construct() {
$this->ci =& get_instance();
$this->session = 'logged_in_user';
$this->auth_page = 'auth';
$this->dashboard = '/';
$this->user_role = $this->get_user_role();
$this->ci->load->model('deals');
}
function get_report_table($data){
$this->ci->load->library('table');
// Bunch of codes below
}
}
So the problem is, when Report.php calling get_report_table()
, it's working fine, the table is showing and the data is correct, no problem at all.
but when Inquiries calling get_report_table()
, then HTTP error 500 appear on the Inquiries only. only the load library is making the error, anything else is fine. so I don't know what's wrong, it's never happened before
codeigniter
codeigniter
edited Nov 8 at 12:07
asked Nov 8 at 8:47
Khrisna Gunanasurya
279217
279217
Provide more code and I can help but at the moment there isn't enough here to make any guesses even.
– AlunR
Nov 8 at 10:29
Provide structures, acutal controller code etc
– AlunR
Nov 8 at 10:29
@AlunR please check, I already added the codes
– Khrisna Gunanasurya
Nov 8 at 12:07
Not sure it will help, but you should not use$session
for a class property name. Change it to$sess
or something. Using$session
will definitely cause a name collision with the CI "session" library. If you do load the session library the call$this->session = 'logged_in_user';
is going to cause problems.
– DFriend
Nov 8 at 20:40
Hi @DFriend I already rename it tosess
, but the problem still exists, not sure why. Thanks for your tips, I'll keep it in mind :D
– Khrisna Gunanasurya
Nov 9 at 2:51
add a comment |
Provide more code and I can help but at the moment there isn't enough here to make any guesses even.
– AlunR
Nov 8 at 10:29
Provide structures, acutal controller code etc
– AlunR
Nov 8 at 10:29
@AlunR please check, I already added the codes
– Khrisna Gunanasurya
Nov 8 at 12:07
Not sure it will help, but you should not use$session
for a class property name. Change it to$sess
or something. Using$session
will definitely cause a name collision with the CI "session" library. If you do load the session library the call$this->session = 'logged_in_user';
is going to cause problems.
– DFriend
Nov 8 at 20:40
Hi @DFriend I already rename it tosess
, but the problem still exists, not sure why. Thanks for your tips, I'll keep it in mind :D
– Khrisna Gunanasurya
Nov 9 at 2:51
Provide more code and I can help but at the moment there isn't enough here to make any guesses even.
– AlunR
Nov 8 at 10:29
Provide more code and I can help but at the moment there isn't enough here to make any guesses even.
– AlunR
Nov 8 at 10:29
Provide structures, acutal controller code etc
– AlunR
Nov 8 at 10:29
Provide structures, acutal controller code etc
– AlunR
Nov 8 at 10:29
@AlunR please check, I already added the codes
– Khrisna Gunanasurya
Nov 8 at 12:07
@AlunR please check, I already added the codes
– Khrisna Gunanasurya
Nov 8 at 12:07
Not sure it will help, but you should not use
$session
for a class property name. Change it to $sess
or something. Using $session
will definitely cause a name collision with the CI "session" library. If you do load the session library the call $this->session = 'logged_in_user';
is going to cause problems.– DFriend
Nov 8 at 20:40
Not sure it will help, but you should not use
$session
for a class property name. Change it to $sess
or something. Using $session
will definitely cause a name collision with the CI "session" library. If you do load the session library the call $this->session = 'logged_in_user';
is going to cause problems.– DFriend
Nov 8 at 20:40
Hi @DFriend I already rename it to
sess
, but the problem still exists, not sure why. Thanks for your tips, I'll keep it in mind :D– Khrisna Gunanasurya
Nov 9 at 2:51
Hi @DFriend I already rename it to
sess
, but the problem still exists, not sure why. Thanks for your tips, I'll keep it in mind :D– Khrisna Gunanasurya
Nov 9 at 2:51
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53204208%2fwhy-does-ci-load-table-library-returns-error-500-is-currently-unable-to-handle-t%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Provide more code and I can help but at the moment there isn't enough here to make any guesses even.
– AlunR
Nov 8 at 10:29
Provide structures, acutal controller code etc
– AlunR
Nov 8 at 10:29
@AlunR please check, I already added the codes
– Khrisna Gunanasurya
Nov 8 at 12:07
Not sure it will help, but you should not use
$session
for a class property name. Change it to$sess
or something. Using$session
will definitely cause a name collision with the CI "session" library. If you do load the session library the call$this->session = 'logged_in_user';
is going to cause problems.– DFriend
Nov 8 at 20:40
Hi @DFriend I already rename it to
sess
, but the problem still exists, not sure why. Thanks for your tips, I'll keep it in mind :D– Khrisna Gunanasurya
Nov 9 at 2:51