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










share|improve this question
























  • 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















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










share|improve this question
























  • 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













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










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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


















  • 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
















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

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















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





































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














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




















































































Popular posts from this blog

Schultheiß

Verwaltungsgliederung Dänemarks

Liste der Kulturdenkmale in Wilsdruff