session_start(): Session data file is not created by your uid

PHP requires session file to be owned by the user running PHP.

Then just run chown -R www-data:www-data /var/www/storage/sessions/ to own session folder and files by your PHP user (www-data:www-data are your PHP user and group separated by :).

You can use PHP method get_current_user() or run in bash php -i | grep user and find your user running PHP there.


Editing config/config.yml and replacing save_path:

session:
    save_path: '/tmp'

this works for me:

sudo chown -R www-data:www-data /var/lib/php/sessions 

Tags:

Php

Session