title: Laravel Session files not cleaning from the framework/sessions folder
body: <p>I am on a shared host (OVH pro) using Laravel 5.2 on production (PHP 7.0.5).</p>
  
  <p>I am using the <strong>file session driver</strong>, and everything was working fine on my previous host (with the same app), but since I moved to OVH, the session files keep being created and are never deleted by the PHP garbage collection.
  I have to manually erase the files (<em>over 5000 files are created per day</em>).</p>
  
  <p>My <code>config/session.php</code> file is set up correctly:</p>
  
  <pre><code>'driver' =&gt; 'file',
  'lifetime' =&gt; 120,
  'lottery' =&gt; [2, 100],
  </code></pre>
  
  <p>And my folders <code>storage</code>, <code>storage/framework</code>, <code>storage/framework/sessions</code> are all set with a 0755 permission.</p>
  
  <p>I also override the <em>php.ini</em> by placing those 2 lines at the top of <code>config/session.php</code></p>
  
  <pre><code>ini_set('session.gc_probability', '5');
  ini_set('session.gc_divisor', '100');
  </code></pre>
  
  <p>It seems to be working fine from what <code>phpinfo()</code> returns:
  <a href="https://i.stack.imgur.com/XWSc8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XWSc8.png" alt="PHP sessions info"></a></p>
  
  <p><em>I contacted my host, but they told me it must have to do with my Laravel app, and they can't help.</em></p>
  
  <p><strong>Edit:</strong> My sessions work fine, I mean that there's only one file created per visitor. The problem is only the fact that the session files are not getting cleaned up, even with a 777 permission.</p>
  
  <hr>
  
  <p>Even when I put the Laravel session lottery to 100/100, the files are still not getting deleted:</p>
  
  <pre><code>    /*
      |--------------------------------------------------------------------------
      | Session Sweeping Lottery
      |--------------------------------------------------------------------------
      |
      | Some session drivers must manually sweep their storage location to get
      | rid of old sessions from storage. Here are the chances that it will
      | happen on a given request. By default, the odds are 2 out of 100.
      |
      */
  
      'lottery' =&gt; [100, 100],
  </code></pre>
  
  <p><strong>EDIT:</strong> OVH hosting specifics: 
  I use multisites on OVH, and the folders containing each site are placed at the route of my OVH host, and not in the default <code>www</code> folder. </p>
  
  <p>I did that for security reasons, because the <code>www</code> folder is publicly available through <code>mynickname.cluster005.ovh.net</code> and I dont want any of my sites to be publicly available from </p>
  
  <p><code>mynickname.cluster005.ovh.net/site1</code></p>
  
  <p><code>mynickname.cluster005.ovh.net/site2</code>...</p>
  
  <p>(<code>www\site1</code>, <code>www\site2</code>...).</p>
  
  <p>So I was thinking that maybe only the files located inside <code>www</code> folder are writable, and maybe not the one outside (at the root)? That would explain while my files are not being deleted. I'll make a test tonight to see if the files are being deleted when placed in <code>www\site1\storage\sessions</code>.</p>