Session problem with integrated tool into hesk

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Hesk Learner
Posts: 5
Joined: Sun Feb 02, 2014 4:48 am

Session problem with integrated tool into hesk

Post by Hesk Learner »

Hello,

I am encountering an integration problem because of the Hesk Session . I have integrated a grid tool into hesk in this path [hdesk > inc > phpGrid] , phpGrid is the folder that contains the tool classes and configuration files. And I am running the tool in a custom webpage called manage_php_grid_iframe.php in the [admin > iframes > manage_php_grid_iframe.php] folder and included this part of codes in the header :
-----------------------------------------------------------------------
define('IN_SCRIPT',1);
define('HESK_PATH','../../');

/* Get all the required files and functions */
require(HESK_PATH . 'hesk_settings.inc.php');
require(HESK_PATH . 'inc/common.inc.php');
require(HESK_PATH . 'inc/admin_functions.inc.php');
require(HESK_PATH . 'inc/reporting_functions.inc.php');

hesk_load_database_functions();

hesk_session_start();
hesk_dbConnect();
hesk_isLoggedIn();


/* Get php Grid Database configuration */
require_once(HESK_PATH . 'inc/phpGrid/conf.php');


-----------------------------------------------------------------------------


When I run the webpage it gives me the error [ Undefined index ] for all the session variables that are used in the tool classes because they are not identifying the session variable that hesk is using.

Then I inserted this line of code in phpGrid conf. php file : session_name('ABC') ;
And in the phpGrid class file : if(!session_id()){ session_start();} else{session_regenerate_id();}

Now the tool is working perfectly. but unfortunately, every time I navigate to the tool's custom webpage,
the hesk session expires and navigates me to the login.php webpage and the custom webpage never get displayed until I insert the username and password. Also, The same process happens when I reload the custom webpage.

I am only one step away from the final solution and spent many days figuring out the final solution but still not yet. Your help is highly appreciated !

Thank you in advance
Post Reply