Ajax Framework (CJAX) for Codeigniter 2.x+ |
[eluser]Ajaxboy[/eluser]
[quote author="Needle" date="1376277640"]Hey, thanks for the speedy reply! I'm using MOD Rewrite to remove the index.php segment but I haven't implemented the ajax rewrite rule that came with the project folder. [/quote] You might want to do that, see this thread: http://ellislab.com/forums/viewthread/220620/ Make sure you turn on all php errors, if you see a blank page it means errors are turned off, you should always see something otherwise.
[eluser]Needle[/eluser]
So this is very strange. I created a fresh install of CI and Cjax in the MAMP htdocs folder. No alterations, just a vanilla install. When I point to http://localhost:8888/project/ajax.php?test/test2, it is working! Now I copy the working files over into a new directory outside of MAMP that I've set up as a virtual host. I point to http://dev.project:8888/ajax.php?test/test and once again I'm back to the blank page that I had before. Just to be certain I point to http://dev.project:8888/ and the CI welcome page displays just like it should. Evidently my virtual host isn't playing nice with Cjax? Any idea why this might be? I also made sure I have display_errors ON in the MAMP php.ini file but I still can't get anything to display when Cjax fails.
[eluser]Ajaxboy[/eluser]
I believe it would have to do with meeting the minimum requirements. Your description points to host configuration obviously. You have to make sure "strict standards" are turned off, that is my best guess, from what you are saying host wise. This is actually a pretty common issue.
[eluser]fran-quero[/eluser]
Any hint to combine cAjax with pagination CI library?
[eluser]Needle[/eluser]
I've spent more time trying to solve my install problem. As mentioned, the two are nearly identical, the difference being that one is in virtual host and one is under htdocs in MAMP. Both are running off the same php.ini file, with STRICT errors turned off. Both have the same .htaccess instructions. Both running the latest Codeigniter install and Cjax install. Yet only the MAMP localhost install is passing the Cjax setup test. Virtual host shows a blank page. I've tried to install Cjax on two live servers as well with no luck. I did notice that when I hit the official test page at http://cjax.sourceforge.net/ajax.php?test/test I get the same result: a blank page. Can someone tell me is this link working for other people?
[eluser]Ajaxboy[/eluser]
[quote author="fran-quero" date="1376434450"]Any hint to combine cAjax with pagination CI library?[/quote] I haven't personally built a pagination with Cjax, sorry. [quote author="Needle" date="1376965302"]I've spent more time trying to solve my install problem. As mentioned, the two are nearly identical, the difference being that one is in virtual host and one is under htdocs in MAMP. Both are running off the same php.ini file, with STRICT errors turned off. Both have the same .htaccess instructions. Both running the latest Codeigniter install and Cjax install. Yet only the MAMP localhost install is passing the Cjax setup test. Virtual host shows a blank page. I've tried to install Cjax on two live servers as well with no luck. I did notice that when I hit the official test page at http://cjax.sourceforge.net/ajax.php?test/test I get the same result: a blank page. Can someone tell me is this link working for other people?[/quote] To find the root of the issue, further debugging is needed, you did reboot the server when changing your php.ini?
[eluser]Fredrik-s[/eluser]
Hello, I also encounter the problem with the "blank page". My setup: PHP Version 5.3.10-1ubuntu3.6 CodeIgniter 2.1.4 AJAXFW_4CI_5.5 Im running "clean URLs". I have followed the solution in this thread: http://ellislab.com/forums/viewthread/220620/#1016536 I get a "200 OK" when checking the network tab in Chrome. Im calling the following URL to test Cjax: http://mydomain.com/ajax/test/test My file structure looks like this: root -.htaccess -ajax.php -ajaxfw.php -application --controllers ---AjaxController.php --response ---sample.php ---test.php -views --test.php --test2.php -cjax htaccess: Code: Options -Indexes I dont get any PHP errors in my error.log. And nothing displays when reaching http://mydomain.com/ajax/test/test just a blank page. Not either any JS errors in console tab in Chrome. What am I doing wrong and how should I fix it?
[eluser]gwatt[/eluser]
Hi I managed to solve a frustrating problem I was having with CJAX and Code Igniter. I thought this might help someone. If I use the full location to ajax like this $ajax->click('#click_div',$ajax->call('http://uebusaito.com/test_ci_cjax3/ajax.php?click/update/')); then the link turns into a crossdomain link (and nothing happens) http://uebusaito.com/test_ci_cjax3/ajax....644449730/ For some reason even though it resolves to the same location I have to use relative links - like this: $ajax->click('#click_div',$ajax->call('../../ajax.php?click/update/')); I feel like relative links could be a problem later because it relies on the Code Igniter URL always having a controller and a function - which may not always be the case. So I would like to get absolute links working. If anyone has any advise please let me know. G
[eluser]Ajaxboy[/eluser]
This is how it was designed to work, because really, you can't make requests outside the scope of a url, that is just how browsers work. Using a full url if not generated is a bad practice. Finally Cjax allows to request remote Url, by using the crossdomain when you enter a full url allows to fetch content outside the scope of the domain. Relative paths must be used, in requests context since they are deemed to stay on that same scope, but you can always use built in function base_url() or create a similar functions, or a constant that can hold the relative path to a url so it's easier to place around.
[eluser]Ajaxboy[/eluser]
[quote author="Fredrik-s" date="1377037588"]Hello, I also encounter the problem with the "blank page". My setup: PHP Version 5.3.10-1ubuntu3.6 CodeIgniter 2.1.4 AJAXFW_4CI_5.5 Im running "clean URLs". I have followed the solution in this thread: http://ellislab.com/forums/viewthread/220620/#1016536 I get a "200 OK" when checking the network tab in Chrome. Im calling the following URL to test Cjax: http://mydomain.com/ajax/test/test My file structure looks like this: root -.htaccess -ajax.php -ajaxfw.php -application --controllers ---AjaxController.php --response ---sample.php ---test.php -views --test.php --test2.php -cjax htaccess: Code: Options -Indexes I dont get any PHP errors in my error.log. And nothing displays when reaching http://mydomain.com/ajax/test/test just a blank page. Not either any JS errors in console tab in Chrome. What am I doing wrong and how should I fix it? [/quote] You have to force php errors on, there is got to be an error, maybe in the environment it forces php not to print the erros, in that case look at the apache error log. |
Welcome Guest, Not a member yet? Register Sign In |