Welcome Guest, Not a member yet? Register   Sign In
CJAX 'Can't find controller' error after install
#8

[eluser]jhob[/eluser]
I've done a bit more investigation and I think there may be some sort of conflict with ion_auth. However CJAX does still look like it is trying to handle non-AJAX methods Here's what I did:

Set up a really simple controller & view:

Controller
Code:
class Ajaxtest extends CI_Controller
{
    function __construct() {
        parent::__construct();
    }

    function index() {
        $this->load->view('ajaxtest');
    }
}

View
Code:
<?php
require_once "ajax.php";
$ajax = ajax();
?>

<html>
    <head>
        <?php echo $ajax->init(); ?>
    </head>
    <body>
       Hello hello
    </body>
</html>

Which gave the error:
Code:
Controller Method/Function: ajaxtest::ajaxtest() was not found

If comment out the ajax init in the view it works:

Code:
//require_once "ajax.php";
//$ajax = ajax();
?>

<html>
    <head>
        <?php //echo $ajax->init(); ?>
    </head>
    <body>
       Hello hello
    </body>
</html>

OR if I change the constructor to PHP4 style it works:

Code:
class Ajaxtest extends CI_Controller
{
    function Ajaxtest() {
        parent::__construct();
    }

    function index() {
        $this->load->view('ajaxtest');
    }
}

and then if I enable ion_auth in autoload:

Code:
$autoload['libraries'] = array('database','session','email','ion_auth');

I get the following error:

Code:
An Error Was Encountered

The model name you are loading is the name of a resource that is already being used: ion_auth_model

If it's relevant I am running PHP5.3.10 on Win7 x64.

So, any thoughts? I'm still none the wiser as to how I resolve this.

Cheers
John


Messages In This Thread
CJAX 'Can't find controller' error after install - by El Forum - 01-07-2013, 09:35 AM
CJAX 'Can't find controller' error after install - by El Forum - 01-07-2013, 10:10 AM
CJAX 'Can't find controller' error after install - by El Forum - 01-09-2013, 10:33 PM
CJAX 'Can't find controller' error after install - by El Forum - 01-10-2013, 01:54 AM
CJAX 'Can't find controller' error after install - by El Forum - 01-10-2013, 07:26 AM
CJAX 'Can't find controller' error after install - by El Forum - 01-10-2013, 08:40 AM
CJAX 'Can't find controller' error after install - by El Forum - 01-10-2013, 06:49 PM
CJAX 'Can't find controller' error after install - by El Forum - 01-11-2013, 03:41 AM
CJAX 'Can't find controller' error after install - by El Forum - 01-11-2013, 07:26 PM
CJAX 'Can't find controller' error after install - by El Forum - 01-15-2013, 05:30 AM
CJAX 'Can't find controller' error after install - by El Forum - 01-18-2013, 07:52 AM
CJAX 'Can't find controller' error after install - by El Forum - 01-19-2013, 01:06 PM
CJAX 'Can't find controller' error after install - by El Forum - 01-19-2013, 03:39 PM
CJAX 'Can't find controller' error after install - by El Forum - 01-19-2013, 09:04 PM
CJAX 'Can't find controller' error after install - by El Forum - 01-20-2013, 10:22 PM
CJAX 'Can't find controller' error after install - by El Forum - 01-22-2013, 09:23 AM
CJAX 'Can't find controller' error after install - by El Forum - 01-22-2013, 06:38 PM
CJAX 'Can't find controller' error after install - by El Forum - 01-23-2013, 02:11 AM
CJAX 'Can't find controller' error after install - by El Forum - 01-23-2013, 08:19 PM
CJAX 'Can't find controller' error after install - by El Forum - 01-24-2013, 06:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB