Symfony 3.1.5 Warning: SessionHandler::read(): Session data file is not created by your uid
<p>I'm running Symfony 3.1.5 on a Ubuntu 14.04, PHP 7.1 and Apache 2.4.23 stack managed by Vagrant 1.8.6/VirtualBox 5.1.6. I'm trying to use a simple controller I've made to render a response on my frontend:</p>

<pre><code>&lt;?php

namespace AppBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\BrowserKit\Response;

class LandingController {
    /**
     * @Route("/", name="homepage")
     */
    public function showAction(){
        return new Response('This is the landing page!');
    }
}
</code></pre>

<p>When I attempt to access my Symfony frontend via <code>/app_dev.php</code> I see:</p>

<p><code>Warning: SessionHandler::read(): Session data file is not created by your uid
500 Internal Server Error - ContextErrorException</code></p>

<p>My Apache log reads:</p>

<p><code>CRITICAL - Uncaught PHP Exception Symfony\Component\Debug\Exception\ContextErrorException: "Warning: SessionHandler::read(): Session data file is not created by your uid" at /var/www/conan/var/cache/dev/classes.php line 366</code></p>

<p>The Symfony dev log reads:</p>

<p><code>==&gt; /var/www/conan/var/logs/dev.log &lt;==
[2016-10-11 14:23:04] request.INFO: Matched route "{route}". {"route":"homepage","route_parameters":{"_controller":"AppBundle\\Controller\\LandingController::showAction","_route":"homepage"},"request_uri":"http://conan.dev/app_dev.php/","method":"GET"} []
[2016-10-11 14:23:04] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\ContextErrorException: "Warning: SessionHandler::read(): Session data file is not created by your uid" at /var/www/conan/var/cache/dev/classes.php line 366 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\ContextErrorException(code: 0): Warning: SessionHandler::read(): Session data file is not created by your uid at /var/www/conan/var/cache/dev/classes.php:366)"} []
</code></p>

<p>Seeing as this appears to be a session related issue, I've referred to the Symfony documentation for <a href="https://symfony.com/doc/current/components/http_foundation/sessions.html">Session Management</a>. It states: </p>

<blockquote>
  <p>Symfony sessions are incompatible with php.ini directive session.auto_start = 1 This directive should be turned off in php.ini, in the webserver directives or in .htaccess.</p>
</blockquote>

<p><code>session.auto_start = 0</code> in my <code>php.ini</code> and the file is owned by user and group <code>root</code>:</p>

<p><code>$ ls -lta /etc/php/7.1/fpm/php.ini
-rw-r--r-- 1 root root 70584 Sep 30 07:29 /etc/php/7.1/fpm/php.ini</code></p>

<p>I've tried creating an <code>.htaccess</code> (which I placed in my <code>DocumentRoot</code>) per the instructions in the Symfony documentation, but the error persists.</p>

<p>I've searched several threads and questions for a solution but have not landed on anything. Any ideas what is causing this?</p>