Welcome Guest, Not a member yet? Register   Sign In
Incomprehensible problem about sessions
#1
Sad 
(This post was last modified: 04-29-2020, 07:08 AM by nicolas33770.)

Good morning all,

I have been working for several weeks on a webapp project and I use sessions. I use Codigniter 3, and Jquery in order to display error messages. My notification system has been working for more than 4 or 5 weeks. I specify that I migrated to a new more powerful Proxmox server with SSD hard disks on which I migrated my LXC. I have been looking for more than 24 hours and I do not understand the problem.

I explain to you. I use a very simple session backup system for notification messages that I load when the pages are reloaded. I think I have found a solution to work around the problem but I would like to understand why it worked for several weeks and that now it no longer works ?


If I use one of the lines with the TAG (DOES NOT WORK ANYMORE), my "ajax_footer_load" data in sessions no longer appears while it was working before. I found a solution using "mark_as_temp" which is apparently working. But that worries me not to understand.

Do you have an idea ?


Code:
<script>
    $(document).ready(function() {
        <?php

        echo $this->session->ajax_footer_load;

        //$this->session->set_userdata('ajax_footer_load', ''); => DOES NOT WORK ANYMORE
        //$this->session->unset_userdata('ajax_footer_load'); => DOES NOT WORK ANYMORE
        //$this->session->mark_as_flash('ajax_footer_load'); => DOES NOT WORK ANYMORE
        //unset($_SESSION['ajax_footer_load']); => DOES NOT WORK ANYMORE

        $this->session->mark_as_temp('ajax_footer_load', 1); // => it seems to work

        ?>
    });
</script>
Reply


Messages In This Thread
Incomprehensible problem about sessions - by nicolas33770 - 04-29-2020, 06:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB