Welcome Guest, Not a member yet? Register   Sign In
Getting Cjax 5.8/5.9 to work on CI 3.x
#1

(This post was last modified: 08-16-2016, 11:05 AM by phpajax.)

Note: Cjax 5.9  will have built-in support for CodeIgniter 3.x

If you were using CI 2.x and Cjax 5.8  and you upgraded to CI 3.x your Cjax installation probably broke.

As you probably already know, Cjax is compatible with the 2.x CI family. CI 3.x does not work out of the box with Cjax 5.8

Here is how you can get Cjax 5.8 to work on CI 3.x

Note: If you use CI 3.x and not Cjax, see at the bottom on this post (see here what you can do with it http://cjax.sourceforge.net/examples/).

Upgrade Instructions:  

Download the latest Cjax from  github (https://github.com/ajaxboy/cjax)

1. Use your existing 5.8 package or download Cjax 5.8


2. Copy cjax/ directory to your existing CI directory and only cjax/ directory nothing else, ignore the other files.


3. Open ajax.php (you should already have this file if you have Cjax 5.8),  Delete everything under line 65 (where Cjax config ends) all the way to the end of the file.

4.  Add this after line 65:

$routing['controller'] = 'AjaxController';
$routing['function']    =   'main';

require 'index.php';


5. save.


7. Go to yoursite.com/ajax.php?test/test and presto!.


If you encounter any issues,  be sure to post.


If you do not have Cjax 5.8 installed on your CI 3X, you can download it from here: https://sourceforge.net/projects/cjax/fi...deIgnater/,  once you download - follow steps 1 to 7.


Cjax 5.8 for codeigniter stills gets downloaded 30 - 50 times per week, so I assume there are quite of few people getting it to work. Please do report if you encounter any problem.
Reply
#2

(08-09-2016, 01:27 PM)phpajax Wrote: Note: Cjax 5.9  will have built-in support for CodeIgniter 3.x

If you were using CI 2.x and Cjax 5.8  and you upgraded to CI 3.x your Cjax installation probably broke.

As you probably already know, Cjax is compatible with the 2.x CI family. CI 3.x does not work out of the box with Cjax 5.8

Here is how you can get Cjax 5.8 to work on CI 3.x

Note: If you use CI 3.x and not Cjax, see at the bottom on this post (see here what you can do with it http://cjax.sourceforge.net/examples/).

Upgrade Instructions:  

Download the latest Cjax from  github (https://github.com/ajaxboy/cjax)

1. Use your existing 5.8 package or download Cjax 5.8


2. Copy cjax/ directory to your existing CI directory and only cjax/ directory nothing else, ignore the other files.


3. Open ajax.php (you should already have this file if you have Cjax 5.8),  Delete everything under line 65 (where Cjax config ends) all the way to the end of the file.

4.  Add this after line 65:

$routing['controller'] = 'AjaxController';
$routing['function']    =   'main';

require 'index.php';


5. save.


7. Go to yoursite.com/ajax.php?test/test and presto!.


If you encounter any issues,  be sure to post.


If you do not have Cjax 5.8 installed on your CI 3X, you can download it from here: https://sourceforge.net/projects/cjax/fi...deIgnater/,  once you download - follow steps 1 to 7.


Cjax 5.8 for codeigniter stills gets downloaded 30 - 50 times per week, so I assume there are quite of few people getting it to work. Please do report if you encounter any problem.
Hello,

I'm having a hard time getting Cjax 5.8 to work with CI 3.1.6. Actually most things work fine:
1.) the routing through AjaxController works
2.) the controller in application\response is called

But, when parent::__construct(); is called, I get the rather threadful message "Unable to locate the specified class: Session.php". I did a lot of debugging here. The session was of course already (correctly) initialized when AjaxController was called - but this second time CodeIgniter tries to load it through common.php/loadclass, which seems unintended, as the call of this routine in the construct of Controller.php doesn't account for the fact that the Session.php file is located in a different folder than the other libraries. So it looks to me that there could be a strucural problem because two controllers are loaded sequentially - I really need help at this point.

Thanks a lot in advance!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB