Skip to content

Commit c7abb14

Browse files
committed
fix #10
1 parent cd8871f commit c7abb14

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/ini/extension/session.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ session.save_handler = files
3030
; where MODE is the octal representation of the mode. Note that this
3131
; does not overwrite the process's umask.
3232
; https://php.net/session.save-path
33-
;session.save_path = "/tmp"
33+
session.save_path = "/var/lib/php-zts/session"
3434

3535
; Whether to use strict session mode.
3636
; Strict session mode does not accept an uninitialized session ID, and

src/package/cli.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,12 @@ public function getFpmConfig(): array
7474
[
7575
'#/usr/share/php[^/]*/#',
7676
'#/usr/local/share/php[^/]*/#',
77+
'#/var/lib/php[^/]*/#',
7778
],
7879
[
7980
getSharedir() . '/',
8081
'/usr/local/share/' . $prefix . '/',
82+
getVarLibdir() . '/',
8183
],
8284
$iniContents
8385
);

src/package/fpm.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ public function getFpmConfig(): array
1919
$contents = str_replace('$confdir', getConfdir(), $contents);
2020
// Replace ALL hardcoded /var/log/php* paths with prefix-based paths
2121
$contents = preg_replace('#/var/log/php[^/]*/#', '/var/log/' . $prefix . '/', $contents);
22+
// Also replace /var/log/php-fpm.log with prefix-based path
23+
$contents = str_replace('/var/log/php-fpm.log', '/var/log/' . $prefix . '/php-fpm.log', $contents);
24+
// Replace ALL hardcoded /var/lib/php* paths with prefix-based paths
25+
$contents = preg_replace('#/var/lib/php[^/]*/#', getVarLibdir() . '/', $contents);
2226
// Replace ALL hardcoded /run/php-fpm* paths with prefix-based paths
2327
$contents = preg_replace('#/run/php-fpm[^/]*/#', '/run/php-fpm' . getBinarySuffix() . '/', $contents);
2428
file_put_contents(TEMP_DIR . '/php-fpm.conf', $contents);
@@ -45,11 +49,13 @@ public function getFpmConfig(): array
4549
[
4650
'#/var/lib/php[^/]*/#',
4751
'#/var/log/php[^/]*/#',
52+
'#/var/log/php-fpm/#',
4853
'#/run/php-fpm[^/]*/#',
4954
],
5055
[
5156
getVarLibdir() . '/',
5257
'/var/log/' . $prefix . '/',
58+
'/var/log/' . $prefix . '/',
5359
'/run/php-fpm' . $binarySuffix . '/',
5460
],
5561
$wwwContents

0 commit comments

Comments
 (0)