Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jimmitjoo's avatar

Session problems on Forge

Ok, 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. But not this OAuth stuff.

Using Laravel 4.2.

Please help me out :)

// Jimmie

0 likes
5 replies
bashy's avatar

Looks like the web server or PHP can't write to /var/lib/php5/ for the session files. What did you change in the config?

jimmitjoo's avatar

I surely didn't change anything in there. I just uncommented the gzip-stuff that was commented out in /etc/nginx/nginx.conf. Nothing that should break this I think?

jimmitjoo's avatar

This is the part I changed:

        ##
        # Gzip Settings
        ##

        gzip on;
        gzip_disable "msie6";

        gzip_vary on;
        gzip_proxied any;
        gzip_comp_level 6;
        gzip_buffers 16 8k;
        gzip_http_version 1.1;
        gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

Everything from gzip_vary and down was commented out before.

bashy's avatar

Does it work again if commenting those out again? (Just to narrow it down).

jimmitjoo's avatar

No, sadly, did not change anything about that.

Please or to participate in this conversation.