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.
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:
$class = $RTR->fetch_class();
$method = $RTR->fetch_method();
echo 'looking for class: ' . $class . '<br/>';
if(class_exists($class) == false) {
)
{
echo 'class does not exist: ' . $class;
show_404("{$class}/{$method}");
}
}
/*
* ------------------------------------------------------
* Is there a "pre_controller" hook?
* ------------------------------------------------------
*/
$EXT->_call_hook('pre_controller');
echo '<br/>after precontroller';
/*
* ------------------------------------------------------
* Instantiate the requested controller
* ------------------------------------------------------
*/
// Mark a start point so we can benchmark the controller
$BM->mark('controller_execution_time_( '.$class.' / '.$method.' )_start');
echo '<br/>before class init: ' . $class;
$CI = new $class();
echo '<br/>after class init';
This is within the /core/CodeIgniter.php file. Here is the output:
CodeIgniter.php
looking for class: servicecontroller
after precontroller
before class init: servicecontroller
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?
servicecontroller.php is arranged like this:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class servicecontroller extends CI_Controller {
}
class Servicecontroller extends CI_Controller... it is explicitly mentioned in the documentation that class names must start with capital letters and lowercase letters are invalid.