Skip to content

Commit

Permalink
Merge pull request phpbb#5506 from toxyy/ticket/15935
Browse files Browse the repository at this point in the history
[ticket/15935] Don't install APCu if it's already installed
  • Loading branch information
marc1706 authored Jan 13, 2019
2 parents b8cc0c7 + 64b6f90 commit d62a16b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions travis/setup-php-extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ echo 'opcache.enable=0' >> "$php_ini_file"
# APCu
if [ `php -r "echo (int) (version_compare(PHP_VERSION, '7.0.0-dev', '>=') && version_compare(PHP_VERSION, '7.3.0-dev', '<'));"` == "1" ]
then
echo 'Enabling APCu PHP extension'
printf "\n" | pecl install apcu
echo 'apc.enabled=1' >> "$php_ini_file"
echo 'apc.enable_cli=1' >> "$php_ini_file"
if ! [ "$(pecl info pecl/apcu)" ]
then
echo 'Enabling APCu PHP extension'
printf "\n" | pecl install apcu
echo 'apc.enabled=1' >> "$php_ini_file"
echo 'apc.enable_cli=1' >> "$php_ini_file"
fi
fi


Expand Down

0 comments on commit d62a16b

Please sign in to comment.