Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295818

PhpStorage\FileStorage tries to write a file using the same name of MTimeProtectedFileStorage's directory name

$
0
0

Problem

  • When switching from the default PhpStorage\MTimeProtectedFileStorage to PhpStorage\FileStorage, you get this fatal error:

    Warning: file_put_contents(sites/default/files/php/service_container/service_container_prod_.php): failed to open stream:

    Permission denied in Drupal\Component\PhpStorage\FileStorage->save()
    (line 60 of core\lib\Drupal\Component\PhpStorage\FileStorage.php).

    Drupal\Component\PhpStorage\FileStorage->save('service_container_prod_.php', '...

Cause

  • sites/default/files/php/service_container/service_container_prod_.php is a directory.

Proposed solution

  1. Change MTimeProtectedFileStorage to not use a .php file suffix for its directory.

Viewing all articles
Browse latest Browse all 295818

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>