How to get my session to write to apache
Try changing your session save path in your php config file, /tmp is a good location.
php.ini
session.save_path = /tmp
http://www.php.net/manual/en/session.configuration.php#ini.session.save-path
Just had the same issue on CentOS:
chown -R apache:apache /var/lib/php/session
Making the httpd user the ower of the session directory should work, as well.
You probably changed a parent folder's permissions recursively, most likely to your own user.
Go to your sessions folder:cd ~;cd /var/lib/php/
If you find a sessions folder, just write these two commands in your terminal:cd ~;
to go home, thensudo chown -R www-data:www-data /var/lib/php/session
Or, if your sessions folder is "sessions" instead of "session":cd ~;
to go home, thensudo chown -R www-data:www-data /var/lib/php/sessions
This way your server will be able to write sessions into your project.
I'm Quite sure about this approach.