Details
-
Bug
-
Resolution: Fixed
-
Critical
-
5.3-dev
-
None
-
None
-
eZ Publish legacy master @312dda9, apache2, mod_php. Calling /api/contentstaging/v1/nodes/2.
Description
When expiry cache is stored by eZExpiryHandler::shutdown(), a warning can be thrown:
Warning: fopen(var/cache/ezfile-tmp.3f1ae5fbb0d9baf4466c6919e98530c4): failed to open stream: Permission denied in /home/bertrand/www/ezpublish-legacy/lib/ezfile/classes/ezfile.php on line 64
As explained in the register_shutdown_function() documentation, this happens because on some servers (apache), the working directory can be unset, or set to a wrong value, in shutdown handlers. In my case, the directory was set to "/", leading to an fopen warning when trying to save expiry cache.