• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
session work in localhost but not in my online website

hey how are you dears? wish fine.
i used the Hybrid session library instead of the original coming with CI by default.
so it works fine with me in localhost . but when i upload it , it dosen't work .
i use it to change the style from basic style (for low connexion) to noraml(with pics).
these is my helper (autoload it)
function getCurrentStyle(){
    $wadae =& get_instance();        
    $style =  $wadae->session->userdata('currentstyle');
    if(!($style == 'basic')){
    return '';
        $style = 'basic';
    return $style;
function setStyle($mode){
    $wadae =& get_instance();    

the controller method:
function index(){
        //Count Fields
        $data['categoriesField'] = $this->gadget->countField('categories');
        $data['sitesField'] = $this->gadget->countField('sites');
        $data['viewsField'] = $this->gadget->getField('views');
        $data['categories'] = $this->category->getCategories();
        $data['pages'] = $this->gadget->getPages();
        $data['adsenses'] = $this->gadget->getAdsenses();
        $data['blocks'] = $this->gadget->getBlocks();
        $data['articles'] = $this->article->getArticles(3);
        //load views
the switcher method :
function SetStyle(){
        $mode  =  $this->uri->segment('3');
        if($mode == FALSE){
        }elseif($mode == 'basic'){
        }elseif(!($mode == 'basic')){
i have to views :
the link : http://domain.ext/folder/home/SetStyle/basic should change the mode to the basic!
so in localhost it works fine but when i upload it to my online website it don't work !!
any solution?

the problem i think that when i set the mode to basic(SetStyle/basic) the session works good but when the method redirect my to the other page the site reinitialize the website so the session lose the value of the currentstyle session name and the helper set 'NULL' by default .
this is what i got in the session table .
|44a785cc71f89821dfaa80399b2c8270||Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.|1280963171|a:1:{s:12:"currentstyle";s:4:"Null";}
|a6de95471f96267d7bd7c30af5db5798||Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.|1280963216|a:1:{s:12:"currentstyle";s:5:"basic";}
so how can i solve the problem that only happens in livesite?

the problem was solved , thank you .

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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