Hi,
I'm having some problem regarding my session. What happened was, on my login page, I have set a few variables for the session. Like normal session codes are to put session_start() on top of the page. On this test login page, there was no session_destroy() or unset session command. Once I tried to log in, it captures and connects to my MySQL and data return and stored in the session variable ($_SESSION['testname']). After authentication is done, it will redirect the user to the dashboard page but it weird whereby the session store in $_SESSION['testname'] is missing when I'm trying to echo $_SESSION['testname'];
So, I do another test page whereby I start_session() and then log in using the same form and data connected to MySQL and it does not redirect to another page. It remains on the same page but this time I already echo the $_SESSION['testname'] on below of the login form to see the output. The output is there but when I refresh the page without submitting the form, the $_SESSION['testname'] are missing. Supposedly it will remain there until I do unset session or session_destroy(), but I missing.
What happened today was I'm doing some housekeeping on my cPanel File Manager and have deleted a few old files dated 2016 - 2018. After that deleting process is done, that is the start of my session not hold into its variable.
I'm using cPanel v76.0.22.
The question is, how to get back everything normal. Why my session is not kept or save into its variable. How to overcome this issue. My session save path was /tmp and the current test system is run under a subdomain path.
Thank you
I'm having some problem regarding my session. What happened was, on my login page, I have set a few variables for the session. Like normal session codes are to put session_start() on top of the page. On this test login page, there was no session_destroy() or unset session command. Once I tried to log in, it captures and connects to my MySQL and data return and stored in the session variable ($_SESSION['testname']). After authentication is done, it will redirect the user to the dashboard page but it weird whereby the session store in $_SESSION['testname'] is missing when I'm trying to echo $_SESSION['testname'];
So, I do another test page whereby I start_session() and then log in using the same form and data connected to MySQL and it does not redirect to another page. It remains on the same page but this time I already echo the $_SESSION['testname'] on below of the login form to see the output. The output is there but when I refresh the page without submitting the form, the $_SESSION['testname'] are missing. Supposedly it will remain there until I do unset session or session_destroy(), but I missing.
What happened today was I'm doing some housekeeping on my cPanel File Manager and have deleted a few old files dated 2016 - 2018. After that deleting process is done, that is the start of my session not hold into its variable.
I'm using cPanel v76.0.22.
The question is, how to get back everything normal. Why my session is not kept or save into its variable. How to overcome this issue. My session save path was /tmp and the current test system is run under a subdomain path.
Thank you