Note that there are some explanatory texts on larger screens.

plurals
  1. POCodeIgniter not able to instantiate controller class
    primarykey
    data
    text
    <p>So I'm trying to troubleshoot why CodeIgniter won't display any output (except for 404's and such). I've checked everything from error logging in php and apache and codeigniter, to the module rewriting. Everything seems to be configured just fine.</p> <p>I started to dive into the CodeIgniter core files and noticed that it was crashing on the line below that tries to instantiate the requested controller class:</p> <pre><code> $class = $RTR-&gt;fetch_class(); $method = $RTR-&gt;fetch_method(); echo 'looking for class: ' . $class . '&lt;br/&gt;'; if(class_exists($class) == false) { ) { echo 'class does not exist: ' . $class; show_404("{$class}/{$method}"); } } /* * ------------------------------------------------------ * Is there a "pre_controller" hook? * ------------------------------------------------------ */ $EXT-&gt;_call_hook('pre_controller'); echo '&lt;br/&gt;after precontroller'; /* * ------------------------------------------------------ * Instantiate the requested controller * ------------------------------------------------------ */ // Mark a start point so we can benchmark the controller $BM-&gt;mark('controller_execution_time_( '.$class.' / '.$method.' )_start'); echo '&lt;br/&gt;before class init: ' . $class; $CI = new $class(); echo '&lt;br/&gt;after class init'; </code></pre> <p>This is within the /core/CodeIgniter.php file. Here is the output:</p> <pre><code>CodeIgniter.php looking for class: servicecontroller after precontroller before class init: servicecontroller </code></pre> <p>Basically it's telling me that it can find the servicecontroller class, but when it tries to instantiate it, it crashes. php error logging is enabled, and display_errors is on. If I force a php error anywhere near here, I see it on the page, but not this one. Does anyone have any idea why it can't get past this line?</p> <p>servicecontroller.php is arranged like this:</p> <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class servicecontroller extends CI_Controller { } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload