Skip to content

Commit 99e0cfe

Browse files
committed
fix tests
1 parent 2b9ba7e commit 99e0cfe

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

bin/bitrix-install

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ if (ini_get('memory_limit') > 0 && (int)ini_get('memory_limit') < 784) {
99

1010
$_SERVER['DOCUMENT_ROOT'] = getenv('BITRIX_PATH') ? getenv('BITRIX_PATH') : '/var/www/html';
1111

12+
$sessionPath = $_SERVER['DOCUMENT_ROOT'] . '/.tmp/sessions';
13+
14+
if (!is_dir($sessionPath) && !mkdir($sessionPath, 0777, true) && !is_dir($sessionPath)) {
15+
throw new \RuntimeException(sprintf('Unable to create session directory: %s', $sessionPath));
16+
}
17+
18+
if (!is_writable($sessionPath)) {
19+
throw new \RuntimeException(sprintf('Session directory is not writable: %s', $sessionPath));
20+
}
21+
22+
ini_set('session.save_path', $sessionPath);
23+
1224
define("B_PROLOG_INCLUDED", true);
1325
define("DEBUG_MODE", true);
1426

0 commit comments

Comments
 (0)