• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
session does not correct work on linux

#1
My setting:
Codeigniter ver3.1.7 on linux OS server  and PHP7
Codeigniter var3.1.1 on window10 OS server and PHP7
config is same both servers
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'cisession';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = sys_get_temp_dir();
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = TRUE;

code is running on window10 OS correct:
$this->load->library('session');
$data = array('curSearchDataPager'=>array('firsttime' => 'OK')); 
$this->session->set_userdata($data);

$tmpSearchData = $this->session->curSearchDataPager;

var_dump($tmpSearchData);
F:\acap2\frameworks\CodeIgniter-3.1.1\application\myapp8\views\pages\pagerlist.php:23:
array (size=1)
 'firsttime' => string 'OK' (length=2)


code is running on linux OS wrong:

int(8) array(1) { ["cisession"]=> string(32) "gume31tf0b1ipof0a25lm3g2p6ft0qm0" }

How to solve it

Please help us
Reply

#2
@gangaa,

Is PHP7 configured the same on both servers?
Reply

#3
(08-20-2018, 08:22 AM)php_rocs Wrote: @gangaa,

Is PHP7 configured the same on both servers?

yes same 

Codeigniter ver3.1.7 on linux OS server  and PHP7
Codeigniter var3.1.1 on window10 OS server and PHP7

config is same both servers
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'cisession';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = sys_get_temp_dir();
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = TRUE;
Reply

#4
(08-20-2018, 04:12 PM)gangaa Wrote:
(08-20-2018, 08:22 AM)php_rocs Wrote: @gangaa,

Is PHP7 configured the same on both servers?
linux and windows both Codeigniter 3.1.9 

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = APPPATH . 'cache/sessions/';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = TRUE;

on linux config/autoload.php

$autoload['libraries'] = array('database','Session');
$autoload['helper'] = array('url');

setting data in session one Controller:

  $this->load->library('session');
  $myArray=$this->session->curSearchDataPager;

getting data othe php file:

  $this->load->library('session');
  $var3=array('curSearchDataPager'=>array('firsttime' => 'OK'));
  $this->session->set_userdata($var3);


on windows10 session file:
__ci_last_regenerate|i:1534842949;logged_in|a:2:{s:5:"email";s:13:"bat@yahoo.com";s:10:"userIDcode";i:100;}curSearchDataPager|a:1:{s:9:"firsttime";s:2:"OK";}lastSQL|

s:401:"SELECT "t2"."rowid", "t1"."mtaskname", "t2"."weeknote", "t3"."weeknm", "t2"."tyear", "t2"."mtaskid", "t2"."perweekname"
FROM "maintask" "t1", "subtask" "t2", 

"weeksname" "t3"
WHERE "t1"."mtaskid" = "t2"."mtaskid"
AND "t1"."ucode" = "t2"."ucode"
AND "t3"."weekcode" = "t2"."perweekname"
AND  "t1"."ucode" = 100 
ORDER BY 

"t2"."tyear" DESC, "t3"."weekcode" DESC, "t2"."mkorder", "t1"."mtaskid"
 LIMIT 25";

on linux session file:
__ci_last_regenerate|i:1534843451;logged_in|a:2:{s:5:"email";s:13:"bat@yahoo.com";s:10:"userIDcode";s:3:"100";}curSearchDataPager|a:5:

{s:9:"cisession";s:32:"mj4k7jan6g002pjvipi4ga328nkn7gr4";s:9:"PHPSESSID";s:32:"o2ckdankkdjhpo941ihed89e6l424m3t";s:3:"gan";s:32:"i67d2a4uaq3t3asgpp23t6l6chjirast";s:10

:"ci_session";s:32:"fg3n86mn77vo8brfiio1j0872ebtelj3";s:11:"ci_sessions";s:32:"u8ek69k5urthup2s81ab7ehujs8a755d";}lastSQL|s:401:"SELECT `t2`.`rowid`, `t1`.`mtaskname`, 

`t2`.`weeknote`, `t3`.`weeknm`, `t2`.`tyear`, `t2`.`mtaskid`, `t2`.`perweekname`
FROM `maintask` `t1`, `subtask` `t2`, `weeksname` `t3`
WHERE `t1`.`mtaskid` = `t2`.`mtaskid`
AND `t1`.`ucode` = `t2`.`ucode`
AND `t3`.`weekcode` = `t2`.`perweekname`
AND  `t1`.`ucode` = 100 
ORDER BY `t2`.`tyear` DESC, `t3`.`weekcode` DESC, `t2`.`mkorder`, `t1`.`mtaskid`
 LIMIT 25";
 
 Why curSearchDataPager|a:1:{s:9:"firsttime";s:2:"OK";} 
 data saved in linux session 
curSearchDataPager|a:5{s:9:"cisession";s:32:"mj4k7jan6g002pjvipi4ga328nkn7gr4";s:9:"PHPSESSID";s:32:"o2ckdankkdjhpo941ihed89e6l424m3t";

?please help me to solve it
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.