I am having a problem with session variables. When I run a test program as simple as:
<?php
session_start();
$_SESSION['test'] = "test";
?>
The variable gets saved when the script is run from the command line, but the sess_ file is empty when the same script is run from a browser. This worked before, but something changed to cause it to no longer save to disk. It seems that Apache might be the culprit but I have no idea how to troubleshoot this.
Session variables not saved
Moderator: General Moderators
Sounds like a permissions problem to me. Running your script from the command line gives you the same permissions as the person who logged into the server.
Running the script from the browser gives you lesser privileges.
Check the folder that stores the sess_ files to see if the permissions have been correctly configured.
Running the script from the browser gives you lesser privileges.
Check the folder that stores the sess_ files to see if the permissions have been correctly configured.
The folder owner and group is set to apache. I tried giving the folder full global priveleges, but that didn't help...
wyred wrote:Sounds like a permissions problem to me. Running your script from the command line gives you the same permissions as the person who logged into the server.
Running the script from the browser gives you lesser privileges.
Check the folder that stores the sess_ files to see if the permissions have been correctly configured.