Hello all,
Hopefully this is not something i have overlooked. Admittedly i am not a seasoned PHP developed... but for the life of me i can not figure this out.
I am considering using ckfinder on a project written in Java. (Java EE and JSP for the presentation). The server does support PHP (5.3.X) as well.
So i can not use the standard CheckAuthentication function to check a session variable that was created in the JSP admin area. So instead.. i want to use a combination of a $_GET variable and check it against a $_COOKIE that is being set in the admin area.
When testing with a URL like so:
/ckfinder/_samples/php/standalone.php?JSESSIONID=F3C10EA39F10AF709A1D7D22243BF340
and then with this in my CheckAuthentication function:
if (isset($_GET['JSESSIONID']) && isset($_COOKIE['JSESSIONID'])) {
if($_GET['JSESSIONID'] === $_COOKIE['JSESSIONID']) {
return true;
} else {
return false;
}
} else {
return false;
}
It does not work.. After some testing.. it does not seem to be able to access any of the $_GET variables in that function. The $_COOKIE variables work fine.
How can i amend the code to allow for visibility to the $_GET variables? If possible?
Many thanks in advance for any suggestions.
Hopefully this is not something i have overlooked. Admittedly i am not a seasoned PHP developed... but for the life of me i can not figure this out.
I am considering using ckfinder on a project written in Java. (Java EE and JSP for the presentation). The server does support PHP (5.3.X) as well.
So i can not use the standard CheckAuthentication function to check a session variable that was created in the JSP admin area. So instead.. i want to use a combination of a $_GET variable and check it against a $_COOKIE that is being set in the admin area.
When testing with a URL like so:
/ckfinder/_samples/php/standalone.php?JSESSIONID=F3C10EA39F10AF709A1D7D22243BF340
and then with this in my CheckAuthentication function:
if (isset($_GET['JSESSIONID']) && isset($_COOKIE['JSESSIONID'])) {
if($_GET['JSESSIONID'] === $_COOKIE['JSESSIONID']) {
return true;
} else {
return false;
}
} else {
return false;
}
It does not work.. After some testing.. it does not seem to be able to access any of the $_GET variables in that function. The $_COOKIE variables work fine.
How can i amend the code to allow for visibility to the $_GET variables? If possible?
Many thanks in advance for any suggestions.
Re: Access $_GET in CheckAuthentication() function in PHP ve