1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-19 15:17:16 +01:00

[ticket/15678] Fix build and cache flow for container

1. During procedure of building container we have to check both required files
in cache: container_* and autoload_*. This files should be "fresh" and if one
of the does not exist then we have to build it and put into a cache one more
time.

2. Fix typo 'posic_getuid' does not exist, so $php_uid is alwasy was false.

PHPBB3-15678
This commit is contained in:
Andrii Afanasiev 2018-06-15 08:35:59 +02:00
parent 8b7ae7c796
commit 7b44e2c791
2 changed files with 8 additions and 1 deletions

View File

@ -143,6 +143,13 @@ class container_builder
{
if ($this->use_extensions)
{
$autoload_cache = new ConfigCache($this->get_autoload_filename(), defined('DEBUG'));
if (!$autoload_cache->isFresh())
{
// autoload cache should be refreshed
$this->load_extensions();
}
require($this->get_autoload_filename());
}

View File

@ -367,7 +367,7 @@ class filesystem implements filesystem_interface
$common_php_group = @filegroup(__FILE__);
// And the owner and the groups PHP is running under.
$php_uid = (function_exists('posic_getuid')) ? @posix_getuid() : false;
$php_uid = (function_exists('posix_getuid')) ? @posix_getuid() : false;
$php_gids = (function_exists('posix_getgroups')) ? @posix_getgroups() : false;
// If we are unable to get owner/group, then do not try to set them by guessing