I have set up sessions on the page that contains ckEditor, as follows:
session_start();
$_SESSION['CKFinder_UserRole'] ='admin';
$_SESSION['IsAuthorized']='true';
(And that page is in a secure location)
In config.php, I have the following:
session_start()
function CheckAuthentication()
{
return isset($_SESSION['IsAuthorized']) && $_SESSION['IsAuthorized'];
}
. . .but this does not allow access to the file system. Can you tell me what I'm doing wrong?
session_start();
$_SESSION['CKFinder_UserRole'] ='admin';
$_SESSION['IsAuthorized']='true';
(And that page is in a secure location)
In config.php, I have the following:
session_start()
function CheckAuthentication()
{
return isset($_SESSION['IsAuthorized']) && $_SESSION['IsAuthorized'];
}
. . .but this does not allow access to the file system. Can you tell me what I'm doing wrong?
Re: setting up sessions
this must work, before you do anything else.
Then add your code and verify that the $_SESSION var is really what you think it is. The code you show is correct, yes, but only if session is started correctly and passed correctly from your authentication routine.
You could easily check that by, for instance, adding the line:
to CheckAuthentication() and verify the content of $_SESSION.
Hope this helps, Paolo
Re: setting up sessions
For some reason it isn't working correctly on one of the test server websites but does work on the other test server sites and the live sites, so this is essentially resolved.