My session variables are resetting every time I load a new page.
I have included a header.php
file to each script with the session_start()
function at the very top like so:
session_start();
error_reporting(E_ERROR);
I have also checked to make sure that the session_id
is the same across all pages and it is.
I checked my web host's php_ini config file and I saw that the session.save_path
was set to /tmp
. I changed it to /var/lib/session/
like someone had suggested on this site and I began to get odd warnings in my code.
Warning: session_start() [function.session-start]: open(/var/lib/php/session//sess_97fca6d21c7ffa8333cd42eaa87f2eac, O_RDWR) failed: Permission denied (13) in /home/mforsyth/public_html/Beesting/header.php on line 2
I do not know what to do to fix this problem. Any help would be useful. If more details are needed please let me know.
EDIT: I have changed the folder back to /tmp and have made sure i can read/write into it and I can. I have also echoed the session id on every page and it all comes out the same. Also it seems that the session only lasts for one page