Welcome Guest, Not a member yet? Register   Sign In
CI crashing before initializing Loader Class
#1

[eluser]Unknown[/eluser]
Hello,

I am trying to load the following url index.php/Ajax_admin_tabs/general.
The code for the controller is:
Code:
<?php

class Ajax_admin_tabs extends Controller
{
    function Ajax_admin_tabs()
    {
        parent::Controller;
    }
    
    function general()
    {
        $this->load->view('admin/General_tab');
    }
    
    function forums()
    {
        $this->load->view('admin/Forums_tab');
    }
    
    function users()
    {
        $this->load->view('admin/Users_tab');
    }
    
    function groups()
    {
        $this->load->view('admin/Groups_tab');
    }
}

The code for the view is:
Code:
<div>
  There is nothing to show yet
</div>

It is intended to be loaded via an ajax call, hence the incomplete html.

The log file is:

DEBUG - 2008-07-11 03:43:03 --&gt; Config Class Initialized
DEBUG - 2008-07-11 03:43:03 --&gt; Hooks Class Initialized
DEBUG - 2008-07-11 03:43:03 --&gt; URI Class Initialized
DEBUG - 2008-07-11 03:43:03 --&gt; Router Class Initialized
DEBUG - 2008-07-11 03:43:03 --&gt; Output Class Initialized
DEBUG - 2008-07-11 03:43:03 --&gt; Input Class Initialized
DEBUG - 2008-07-11 03:43:03 --&gt; Global POST and COOKIE data sanitized
DEBUG - 2008-07-11 03:43:03 --&gt; Language Class Initialized

It seems like CI is crashing out before it ever gets to my code. I have tried going to the URL directly and going to it through the ajax request but they both give the same result.

I've been digging through the CI source to determine the problem but cannot even determine when the call to
Code:
load_class('Loader')
takes place on PHP 5. (I have only seen it called, with a second argument set to false if
Code:
floor(phpversion()) < 5
but I know that it happens from looking at other log files. suffice it to say that I am very confused and am going to bed. heres wishing for a 'magic answer' when I wake up...or at least a clue.

Thanks for the time,
Aaron
#2

[eluser]Unknown[/eluser]
Doh!!! forgot to put parens after parent::Controller. I still don't understand why that would affect things the way it did. That file should not have even been loaded (according to my understanding) at the time of the hangup. After loading the Language Class, it should have loaded the Loader class and -then- have looked at the controller as per the following log file.

DEBUG - 2008-07-11 04:08:17 --&gt; Config Class Initialized
DEBUG - 2008-07-11 04:08:17 --&gt; Hooks Class Initialized
DEBUG - 2008-07-11 04:08:17 --&gt; URI Class Initialized
DEBUG - 2008-07-11 04:08:17 --&gt; Router Class Initialized
DEBUG - 2008-07-11 04:08:17 --&gt; Output Class Initialized
DEBUG - 2008-07-11 04:08:17 --&gt; Input Class Initialized
DEBUG - 2008-07-11 04:08:17 --&gt; Global POST and COOKIE data sanitized
DEBUG - 2008-07-11 04:08:17 --&gt; Language Class Initialized
DEBUG - 2008-07-11 04:08:17 --&gt; Loader Class Initialized
DEBUG - 2008-07-11 04:08:17 --&gt; Controller Class Initialized
DEBUG - 2008-07-11 04:08:17 --&gt; File loaded: C:\Code\htdocs\Forums/system/application/views/admin/Forums_tab.php
DEBUG - 2008-07-11 04:08:17 --&gt; Final output sent to browser
DEBUG - 2008-07-11 04:08:17 --&gt; Total execution time: 0.1420

So I guess now I'm just looking for a clue. I'm a newbie to PHP programming and CI so I may be in over my head. does the base5.php file have something to do with it? Thanks again




Theme © iAndrew 2016 - Forum software by © MyBB