Skip to content

Commit 4043c22

Browse files
committed
Release 7.4.0 - See CHANGELOG.md
1 parent 8a36375 commit 4043c22

File tree

4 files changed

+46
-17
lines changed

4 files changed

+46
-17
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 7.4.0 2023-01-15 <dave at tiredofit dot ca>
2+
3+
### Added
4+
- Add JIT Compilation support by means of PHP_OPCACHE_JIT_MODE and PHP_OPCACHE_BUFFER_SIZE variables (8.x only)
5+
6+
### Changed
7+
- Minor formatting fixes
8+
9+
110
## 7.3.4 2023-01-11 <dave at tiredofit dot ca>
211

312
### Changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ When `PHP_FPM_CONTAINER_MODE` set to `nginx` the `PHP_FPM_LISTEN_PORT` environme
205205
| `PHP_LOG_LOCATION` | Log Location for PHP Logs | `/www/logs/php-fpm` |
206206
| `PHP_MEMORY_LIMIT` | How much memory should PHP use | `128M` |
207207
| `PHP_OPCACHE_INTERNED_STRINGS_BUFFER` | OPCache interned strings buffer | `16` |
208+
| `PHP_OPCACHE_JIT_BUFFER_SIZE` | JIT Buffer Size `0` to disable | `50M` |
209+
| `PHP_OPCACHE_JIT_MODE` | JIT [CRTO](https://wiki.php.net/rfc/jit) Mode - > PHP 8.x | `1255` |
208210
| `PHP_OPCACHE_MAX_ACCELERATED_FILES` | OPCache Max accelerated files | `5413` |
209211
| `PHP_OPCACHE_MEM_SIZE` | OPCache Memory Size - Set `0` to disable or via other env vars | `128` |
210212
| `PHP_OPCACHE_REVALIDATE_FREQ` | OPCache revalidate frequency | `60` |

install/assets/defaults/20-php-fpm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ PHP_LOG_LIMIT=${PHP_LOG_LIMIT:-"3072"}
2525
PHP_LOG_LOCATION=${PHP_LOG_LOCATION:-"/www/logs/php-fpm"}
2626
PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-"128M"}
2727
PHP_OPCACHE_INTERNED_STRINGS_BUFFER=${PHP_OPCACHE_INTERNED_STRINGS_BUFFER:-"16"}
28+
PHP_OPCACHE_JIT_BUFFER_SIZE=${PHP_OPCACHE_JIT_BUFFER_SIZE:-"50M"}
29+
PHP_OPCACHE_JIT_MODE=${PHP_OPCACHE_JIT_MODE:-"1255"}
2830
PHP_OPCACHE_MAX_ACCELERATED_FILES=${PHP_OPCACHE_MAX_ACCELERATED_FILES:-"5413"}
2931
PHP_OPCACHE_MEM_SIZE=${PHP_OPCACHE_MEM_SIZE:-"128"}
3032
PHP_OPCACHE_REVALIDATE_FREQ=${PHP_OPCACHE_REVALIDATE_FREQ:-"60"}

install/assets/functions/20-php-fpm

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ EOF
115115
fi
116116

117117
if [ "${PHP_OPCACHE_MEM_SIZE}" = "0" ] || var_false "${PHP_ENABLE_OPCACHE}" ; then
118-
sed -i -e "s/opcache.enable=1/opcache.enable=0/g" /assets/php-fpm/mods-available/opcache.ini
119-
sed -i -e "s/opcache.enable_cli=1/opcache.enable_cli=0/g" /assets/php-fpm/mods-available/opcache.ini
118+
sed -i \
119+
-e "s/opcache.enable=1/opcache.enable=0/g" \
120+
-e "s/opcache.enable_cli=1/opcache.enable_cli=0/g" \
121+
/assets/php-fpm/mods-available/opcache.ini
120122
else
121123
if var_true "${CONTAINER_ENABLE_MONITORING}" && [ "${CONTAINER_MONITORING_BACKEND,,}" = "zabbix" ]; then
122124
source /assets/defaults/03-monitoring
@@ -191,8 +193,10 @@ phpfpm_configure_nginx() {
191193
done
192194
echo "}" >> /etc/nginx/snippets/php-fpm-upstream.conf
193195

194-
sed -i -e "/# Do not delete - Upstream Configuration/a\ \ \ \ include \/etc\/nginx\/snippets\/php-fpm-upstream.conf;" /etc/nginx/nginx.conf
195-
sed -i -e "/# Do not delete - Upstream Configuration/a\ \ \ \ ### PHP-FPM Multiple Handlers configuration" /etc/nginx/nginx.conf
196+
sed -i \
197+
-e "/# Do not delete - Upstream Configuration/a\ \ \ \ include \/etc\/nginx\/snippets\/php-fpm-upstream.conf;" \
198+
-e "/# Do not delete - Upstream Configuration/a\ \ \ \ ### PHP-FPM Multiple Handlers configuration" \
199+
/etc/nginx/nginx.conf
196200
}
197201

198202
phpfpm_configure_server() {
@@ -223,21 +227,33 @@ phpfpm_configure_server() {
223227

224228
update_template /etc/nginx/snippets/php-fpm.conf PHP_TIMEOUT
225229

226-
sed -i -e "s#apc.shm_size=.*#apc.shm_size=${PHP_APC_SHM_SIZE}#g" \
227-
-e "s#apc.ttl=.*#apc.ttl=${PHP_APC_TTL}#g" \
230+
sed -i \
231+
-e "s#apc.shm_size=.*#apc.shm_size=${PHP_APC_SHM_SIZE}#g" \
232+
-e "s#apc.ttl=.*#apc.ttl=${PHP_APC_TTL}#g" \
228233
/assets/php-fpm//mods-available/apcu.ini
229234

230-
sed -i -e "s#opcache.memory_consumption=.*#opcache.memory_consumption=${PHP_OPCACHE_MEM_SIZE}#g" \
231-
-e "s#opcache.interned_strings_buffer=.*#opcache.interned_strings_buffer=${PHP_OPCACHE_INTERNED_STRINGS_BUFFER}#g" \
232-
-e "s#opcache.max_accelerated_files=.*#max_accelerated_files=${PHP_OPCACHE_MAX_ACCELERATED_FILES}#g" \
233-
-e "s#opcache.revalidate_freq=.*#revalidate_freq=${PHP_OPCACHE_REVALIDATE_FREQ}#g" \
235+
sed -i \
236+
-e "s#opcache.memory_consumption=.*#opcache.memory_consumption=${PHP_OPCACHE_MEM_SIZE}#g" \
237+
-e "s#opcache.interned_strings_buffer=.*#opcache.interned_strings_buffer=${PHP_OPCACHE_INTERNED_STRINGS_BUFFER}#g" \
238+
-e "s#opcache.max_accelerated_files=.*#max_accelerated_files=${PHP_OPCACHE_MAX_ACCELERATED_FILES}#g" \
239+
-e "s#opcache.revalidate_freq=.*#revalidate_freq=${PHP_OPCACHE_REVALIDATE_FREQ}#g"
234240
/assets/php-fpm/mods-available/opcache.ini
235241

236-
sed -i -e "s#memory_limit = .*#memory_limit = ${PHP_MEMORY_LIMIT}#g" \
237-
-e "s#max_input_time = .*#max_input_time = ${PHP_TIMEOUT}#g" \
238-
-e "s#default_socket_timeout = .*#default_socket_timeout = ${PHP_TIMEOUT}#g" \
239-
-e "s#post_max_size = .*#post_max_size = ${PHP_UPLOAD_MAX_SIZE}#g" \
240-
-e "s#upload_max_filesize = .*#upload_max_filesize = ${PHP_UPLOAD_MAX_SIZE}#g" \
242+
if [ "${PHP_BASE:0:1}" = "7" ] ; then
243+
sed -i "/opcache.jit/d" /assets/php-fpm/mods-available/opcache.ini
244+
else
245+
sed -i \
246+
-e "s#opcache.jit_buffer_size=.*#opcache.jit_buffer_size=${PHP_OPCACHE_JIT_BUFFER_SIZE}#g" \
247+
-e "s#opcache.jit=.*#opcache.jit=${PHP_OPCACHE_JIT_MODE}#g"
248+
/assets/php-fpm/mods-available/opcache.ini
249+
fi
250+
251+
sed -i \
252+
-e "s#memory_limit = .*#memory_limit = ${PHP_MEMORY_LIMIT}#g" \
253+
-e "s#max_input_time = .*#max_input_time = ${PHP_TIMEOUT}#g" \
254+
-e "s#default_socket_timeout = .*#default_socket_timeout = ${PHP_TIMEOUT}#g" \
255+
-e "s#post_max_size = .*#post_max_size = ${PHP_UPLOAD_MAX_SIZE}#g" \
256+
-e "s#upload_max_filesize = .*#upload_max_filesize = ${PHP_UPLOAD_MAX_SIZE}#g" \
241257
/assets/php-fpm/cli/php.ini
242258

243259
if [ -n "${PHP_IDE_CONFIG}" ]; then
@@ -248,9 +264,9 @@ phpfpm_configure_server() {
248264
fi
249265
fi
250266

251-
sed -i -e "s#date.timezone = .*#date.timezone = $(cat /etc/timezone)#g" /assets/php-fpm/cli/php.ini
252-
sed -i -e "s#date.timezone = .*#date.timezone = $(cat /etc/timezone)#g" /assets/php-fpm/fpm/php.ini
267+
sed -i -e "s#date.timezone = .*#date.timezone = $(cat /etc/timezone)#g" /assets/php-fpm/cli/php.ini /assets/php-fpm/fpm/php.ini
253268
}
269+
254270
phpfpm_create_default_page() {
255271
if var_true "${php_enable_create_sample_php}" ; then
256272
if [ ! -f "${NGINX_WEBROOT}"/index.php ] ; then

0 commit comments

Comments
 (0)