PHP 7 - установка php-acpu и php-apcu-bc - Backwards Compatibility Extension

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
Перейти к:навигация, поиск


PHP 7 - установка php-acpu и php-apcu-bc - Backwards Compatibility Extension на CentOS 6

Установка для php 7 модуля php-apcu

После установки php 7 делаем:

# yum install gcc -y
# pecl install apcu
Build process completed successfully
Installing '/usr/lib64/php/modules/apcu.so'
Installing '/usr/include/php/ext/apcu/apc_cache.h'
Installing '/usr/include/php/ext/apcu/apc_sma_api.h'
Installing '/usr/include/php/ext/apcu/apc_api.h'
Installing '/usr/include/php/ext/apcu/php_apc.h'
Installing '/usr/include/php/ext/apcu/apc_lock_api.h'
Installing '/usr/include/php/ext/apcu/apc_lock.h'
Installing '/usr/include/php/ext/apcu/apc_arginfo.h'
Installing '/usr/include/php/ext/apcu/apc_pool_api.h'
Installing '/usr/include/php/ext/apcu/apc_globals.h'
Installing '/usr/include/php/ext/apcu/apc_pool.h'
Installing '/usr/include/php/ext/apcu/apc_serializer.h'
Installing '/usr/include/php/ext/apcu/apc_cache_api.h'
Installing '/usr/include/php/ext/apcu/apc_iterator.h'
Installing '/usr/include/php/ext/apcu/apc_stack.h'
Installing '/usr/include/php/ext/apcu/apc.h'
Installing '/usr/include/php/ext/apcu/apc_sma.h'
install ok: channel://pecl.php.net/apcu-5.1.7
configuration option "php_ini" is not set to php.ini location
You should add "extension=apcu.so" to php.ini
# echo "extension=apcu.so" >> /etc/php.ini
# /etc/init.d/httpd restart


Установка для php 7 модуля php-apcu-bc - Backwards Compatibility Extension

  # pecl install apcu_bc-beta
Build process completed successfully
Installing '/usr/lib64/php/modules/apc.so'
install ok: channel://pecl.php.net/apcu_bc-1.0.3
configuration option "php_ini" is not set to php.ini location
You should add "extension=apc.so" to php.ini
# echo "extension=apc.so" >> /etc/php.ini
# /etc/init.d/httpd restart

Результат

Результат проверяем через phpinfo():
Apc1111111.png


или вот так через консольку:

# php -i | grep -i "APC Compatibility"
APC Compatibility => 1.0.3


Таблица совместимости PHP акселераторов с ОС, версиями веб-серверов, версиями PHP


Ac11111.png