File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -403,6 +403,13 @@ init)
403403 fi
404404
405405 build_create_directories
406+
407+ # opcache is no longer loaded via zend_extension in PHP 8.5+
408+ php_major=" ${PHP_VERSION%% .* } "
409+ php_minor=" ${PHP_VERSION#* .} " ; php_minor=" ${php_minor%% .* } "
410+ if (( php_major >= 9 || (php_major == 8 && php_minor >= 5 ) )) ; then
411+ sed -i ' s/^zend_extension=opcache\.so/;zend_extension=opcache.so/' " ${PHP_BASE_PATH} /etc/php.ini"
412+ fi
406413 ;;
407414prepare)
408415 packages_install $( build_get_runtime_packages) 1> $( debug_device)
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ date.timezone = ${PHP_DATE_TIMEZONE}
160160
161161
162162[opcache]
163- ; Load the opcache extension
163+ ; Load the opcache extension - only needed in PHP up to 8.4
164164zend_extension =opcache.so
165165
166166; Determines if Zend OPCache is enabled
You can’t perform that action at this time.
0 commit comments