White screen: Failed to initialize storage module

Hi all,

I just moved from Ubuntu 14.04 to Arch Linux. I moved my files over and, after some pita over PHP and open_basedir settings, I think I’m down to my last error. Unfortunately I can’t seem to solve it myself. When I go to my site I only see a white screen, checking the logs I see this error constantly:

Oct 30 01:45:17 home nginx[18821]: PHP message: PHP Fatal error: session_start(): Failed to initialize storage module: files (path: ) in /data/1/public_html/cloud.XXXX.nl/lib/private/Session/Internal.php on line 49" while reading response header from upstream, client: 217.19.26.115, server: cloud.XXXX.nl, request: "GET /status.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "cloud.XXXX.nl"

Doing a “sudo -u http php occ app:disable storage” results in “No such app enabled: storage” so I can’t prevent the storage module from loading (it’s not an app I know…) The way it was setup on my old Ubuntu box was that I had one external storage option enabled, a local folder. I’m guessing it can’t reach that folder now, perhaps due to permissions? Is there a way to disable this storage option with the web interface?

Trying to wget https://cloud.XXXX.nl I get an internal server error:
Connecting to cloud.XXXX.nl (cloud.XXXX.nl)|217.19.26.115|:443… connected.
HTTP request sent, awaiting response… 500 Internal Server Error
2016-10-30 08:35:55 ERROR 500: Internal Server Error.

A php.info file in the same directory as the installation does work so I do suspect the install to be at fault. Performing “sudo -u http php occ app:list” does produce a list of installed and enabled apps, this means MAriaDB, and php-fpm are working correctly I’d say.

This suggests a configuration error perhaps?

Here is my nginx server block:

upstream php-handler {
  #server 127.0.0.1:9000;
  #server unix:/var/run/php5-fpm.sock;
  server unix:/var/run/php-fpm/php-fpm.sock;
  }

server {
  listen 80;
  server_name cloud.XXXX.nl;
  # enforce https
  return 301 https://$server_name$request_uri;
  }

server {
  listen 443 ssl;
  server_name cloud.XXXX.nl;
  root /data/1/public_html/cloud.XXXX.nl/;
  location / {
    index index.php index.html index.htm;
   # The following 2 rules are only needed with webfinger
   rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
   rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;

   rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
   rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;

   rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;

   try_files $uri $uri/ /index.php;
  }

  ssl_certificate /etc/letsencrypt/live/cloud.XXXX.nl/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/cloud.XXXX.nl/privkey.pem;
  
  # SSL settings to get A rating on ssllabs
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
  ssl_prefer_server_ciphers on;
  ssl_session_cache shared:SSL:10m;
  ssl_dhparam /etc/ssl/certs/dhparam.pem;

  # Add headers to serve security related headers
  add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
  #add_header X-Content-Type-Options nosniff;
  #add_header X-Frame-Options "SAMEORIGIN";
  #add_header X-XSS-Protection "1; mode=block";
  #add_header X-Robots-Tag none;
  #add_header X-Download-Options noopen;
  #add_header X-Permitted-Cross-Domain-Policies none;

  #client_body_temp_path /tmp;

  # set max upload size
  client_max_body_size 16400M;
  fastcgi_buffers 64 4K;

  # Disable gzip to avoid the removal of the ETag header
  gzip off;

  # Uncomment if your server is build with the ngx_pagespeed module
  # This module is currently not supported.
  #pagespeed off;

  rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
  rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
  rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;

  index index.php;
  error_page 403 /core/templates/403.php;
  error_page 404 /core/templates/404.php;

  location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README){
    deny all;
    }

   location ~ \.php(?:$|/) {
   fastcgi_split_path_info ^(.+\.php)(/.+)$;
   include fastcgi_params;
   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
   fastcgi_param PATH_INFO $fastcgi_path_info;
   fastcgi_param HTTPS on;
   fastcgi_pass php-handler;
   fastcgi_read_timeout 600;
   }

   # Optional: set long EXPIRES header on static assets
   location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
       expires 30d;
       # Optional: Don't log access to assets
         access_log off;
   }

}

I took it from: https://docs.nextcloud.com/server/10/admin_manual/installation/nginx_nextcloud_9x.html I changed some things, it doesn’t work by default. At this point i’m highly suspecting the config file or perhaps something in the nextcloud config that changed form one install to the next. I don’t what log files to check additionally. I’m pretty sure I named the database, database user and passwd all the same as the old install.

Edit:
It might actually be a mariadb thing I think now:

journalctl | grep php

Oct 30 09:21:25 home nginx[681]: 2016/10/30 09:21:25 [error] 683#683: *67 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /data/1/public_html/cloud.XXXX.nl/lib/private/DB/Connection.php:59
Oct 30 09:21:25 home nginx[681]: #0 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
Oct 30 09:21:25 home nginx[681]: #1 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
Oct 30 09:21:25 home nginx[681]: #2 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
Oct 30 09:21:25 home nginx[681]: #3 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): Doctrine\DBAL\Connection->getDatabasePlatform()
Oct 30 09:21:25 home nginx[681]: #4 /data/1/public_html/cloud.XXXX.nl/lib/private/DB/Connection.php(142): Doctrine\DBAL\Connection->setTransactionIsolation(2)
Oct 30 09:21:25 home nginx[681]: PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /data/1/public_html/cloud.XXXX.nl/lib/private/DB/Connection.php:59
Oct 30 09:21:25 home nginx[681]: #0 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
Oct 30 09:21:25 home nginx[681]: #1 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
Oct 30 09:21:25 home nginx[681]: #2 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
Oct 30 09:21:25 home nginx[681]: #3 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): Doctrine\DBAL\Connection->getDatabasePlatform()
Oct 30 09:21:25 home nginx[681]: #4 /data/1/public_html/cloud.XXXX.nl/lib/private/DB/Connection.php(142): Doctrine\DBAL\Connection->setTransacti
Oct 30 09:21:25 home nginx[681]: 2016/10/30 09:21:25 [error] 683#683: *68 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /data/1/public_html/cloud.XXXX.nl/lib/private/DB/Connection.php:59
Oct 30 09:21:25 home nginx[681]: #0 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
Oct 30 09:21:25 home nginx[681]: #1 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
Oct 30 09:21:25 home nginx[681]: #2 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
Oct 30 09:21:25 home nginx[681]: #3 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): Doctrine\DBAL\Connection->getDatabasePlatform()
Oct 30 09:21:25 home nginx[681]: #4 /data/1/public_html/cloud.XXXX.nl/lib/private/DB/Connection.php(142): Doctrine\DBAL\Connection->setTransactionIsolation(2)
Oct 30 09:21:25 home nginx[681]: PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /data/1/public_html/cloud.XXXX.nl/lib/private/DB/Connection.php:59
Oct 30 09:21:25 home nginx[681]: #0 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
Oct 30 09:21:25 home nginx[681]: #1 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
Oct 30 09:21:25 home nginx[681]: #2 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
Oct 30 09:21:25 home nginx[681]: #3 /data/1/public_html/cloud.XXXX.nl/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): Doctrine\DBAL\Connection->getDatabasePlatform()
Oct 30 09:21:25 home nginx[681]: #4 /data/1/public_html/cloud.XXXX.nl/lib/private/DB/Connection.php(142): Doctrine\DBAL\Connection->setTransacti

Best regards.