Reputation: 1972
I can start by saying that I am not great on this server config stuff. I have had the social logins working with sessions and all that before, but then I edited the config file because I wanted to gzip the content that was sent to the browser. Now I am getting this.
ErrorException (E_UNKNOWN) open(/var/lib/php5/sess_2fde40503711502d2a6fe148dfcee783, O_RDWR) failed: Permission denied (13)
Open: /home/forge/default/vendor/lusitanian/oauth/src/OAuth/Common/Storage/Session.php
public function __construct(
$startSession = true,
$sessionVariableName = 'lusitanian_oauth_token',
$stateVariableName = 'lusitanian_oauth_state'
) {
if ($startSession && !isset($_SESSION)) {
session_start();
}
session_start(); has red background in the error. I am not sure what the reason is for this error? Have anybody else got the same thing? It started happening after I added gzip to the config, but even if I remove it it won't go back to working for some reason.
Worth to note is that the usual email + password login works fine even that they are using sessions. But not this OAuth stuff.
Using Laravel 4.2.
Upvotes: 0
Views: 728
Reputation: 46
PHP doesn't have permission to write on the sessions folder. Given the ErrorException, I'm assuming your sessions were setup to use the folder "/var/lib/php5". So, you can do that:
sudo chmod 777 /var/lib/php5/
Or you can open the php.ini file and edit the following line:
session.save_path = "/path/to/your/folder"
Otherwise, you can use:
ini_set(session.save_path, '/path/to/your/folder')
Upvotes: 3