Welcome Guest, Not a member yet? Register   Sign In
AjaxFw (CJAX) For CodeIgnater 5.0 Stable
#31

[eluser]Ayman Elarian[/eluser]
feedback 2

after more debug found that

Code:
/**
* Handle mod_rewrite redirects
*/
if(isset($_SERVER['REDIRECT_QUERY_STRING']) && $_SERVER['REDIRECT_QUERY_STRING']) {
$_SERVER['QUERY_STRING'] = $_SERVER['REDIRECT_QUERY_STRING'];
} else if(isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] && !$_SERVER['QUERY_STRING']) {
$_SERVER['QUERY_STRING'] = ltrim($_SERVER['PATH_INFO'],'/');
}
//print_r($_SERVER);
/**
* Handle friendly URLS
*/
if(isset($_SERVER['QUERY_STRING']) && $query = $_SERVER['QUERY_STRING']) {
$packet = explode('/' ,rtrim($query,'/'));


$_SERVER['QUERY_STRING'] is empty no data inside , how to fix ?
#32

[eluser]Ayman Elarian[/eluser]

i done run that command but still no success

Code:
C:\Inetpub\AdminScripts>cscript adsutil.vbs set w3svc/AllowPathInfoForScriptMapp
ings True
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

AllowPathInfoForScriptMappings  : (BOOLEAN) True
#33

[eluser]Ajaxboy[/eluser]
I an unfamiliar with what you are doing in the posting above. The snippets you posted from the ajaxframework don't seem to be a problem, and if they are - Likely something is off on the php install.
If the issue was what you suggested AjaxFw would print the error "Controller not found" or something similar, or php would generate an error.

$controller will be empty if you don't specify a controller, $_SERVER['QUERY_STRING'] will also be empty if you are not passing a query string.

Could you post your custom code, or the code you are using to access the AjaxFw

Do you have an online testing demo?

#34

[eluser]Ayman Elarian[/eluser]
after deep debug found that if url like that

domain/ajax.php?overlay/loadsubcustomers/28

it will not work

but if it

domain/ajax.php/overlay/loadsubcustomers/28
it will return query string

how to change it on cjax fw to make all with slash ?
#35

[eluser]Ajaxboy[/eluser]
Because it is on a Windows 2003 server, I am not sure if this would qualify as bug.

The section that handles this area is in cjax/cjax.php, I would not able to reproduce because I don't have access to a Window 2003 server, and don't know the type of configuration in your installation.

As I mentioned before, Windows 2003 has been dumped by PHP. With some debugging you should be able to fix it though.
#36

[eluser]Ayman Elarian[/eluser]
thanks for your help , but you didnt get my point

how can i change ajax calling url from ajax.php?XXXX to ajax.php/xxxx
as it will work if like that , from wich file as cjax/cjax.php that create from query string not call
#37

[eluser]Ajaxboy[/eluser]
I did get your point. Generally, there is no difference and should work either way, as documented here: http://cjax.sourceforge.net/docs/url_styles.php
#38

[eluser]Ayman Elarian[/eluser]
ok great fixed , my last problem is

ajax.php/overlay/add/111/27/738/test/24.6788041967/46.6888338412/0/05:28:30/07:28:30/0/0/0/0/0/0/0


output
Code:
Array
(
    [controller] => overlay
    [function] => add
    [cjax] => 1345537323
    [a] => 111
    [b] => 27
    [c] => 738
    [d] => test
    [e] => 24.6788041967
    [f] => 46.6888338412
)

//if any value is 0 it ignore all after /0/xxx

//how to fix that
#39

[eluser]Ayman Elarian[/eluser]
also it limited by values from a to f
#40

[eluser]Ajaxboy[/eluser]
In file cjax/cjax.php line 52:

Change:

Code:
$params = array('a','b','c','d','e','f');

to:

Code:
$params = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');

To expand the number of parameters, this will be default on next release.




Theme © iAndrew 2016 - Forum software by © MyBB