mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge pull request #1998 from bantu/ticket/12141
[ticket/12141] Disable opcache extension on PHP 5.5.7
This commit is contained in:
commit
db9fd30e7c
3 changed files with 57 additions and 22 deletions
|
@ -16,8 +16,8 @@ services:
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- sh -c "if [ '$DB' = 'mariadb' ]; then travis/setup-mariadb.sh; fi"
|
- sh -c "if [ '$DB' = 'mariadb' ]; then travis/setup-mariadb.sh; fi"
|
||||||
|
- sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then travis/setup-php-extensions.sh; fi"
|
||||||
- sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi"
|
- sh -c "if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` = "1" ]; then travis/setup-webserver.sh; fi"
|
||||||
- travis/install-php-extensions.sh
|
|
||||||
- cd phpBB
|
- cd phpBB
|
||||||
- php ../composer.phar install --dev --no-interaction --prefer-source
|
- php ../composer.phar install --dev --no-interaction --prefer-source
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# @copyright (c) 2013 phpBB Group
|
|
||||||
# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
|
||||||
#
|
|
||||||
set -e
|
|
||||||
|
|
||||||
function add_ext_to_php_ini
|
|
||||||
{
|
|
||||||
echo "extension=$1.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`
|
|
||||||
}
|
|
||||||
|
|
||||||
# redis
|
|
||||||
git clone git://github.com/nicolasff/phpredis.git
|
|
||||||
cd phpredis
|
|
||||||
phpize
|
|
||||||
./configure
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
cd ..
|
|
||||||
add_ext_to_php_ini 'redis'
|
|
56
travis/setup-php-extensions.sh
Executable file
56
travis/setup-php-extensions.sh
Executable file
|
@ -0,0 +1,56 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# @copyright (c) 2013 phpBB Group
|
||||||
|
# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
#
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
function find_php_ini
|
||||||
|
{
|
||||||
|
echo $(php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||")
|
||||||
|
}
|
||||||
|
|
||||||
|
# $1 - PHP extension name
|
||||||
|
# $2 - PHP ini file path
|
||||||
|
function register_php_extension
|
||||||
|
{
|
||||||
|
echo "extension=$1.so" >> "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
# $1 - PHP extension name
|
||||||
|
# $2 - PHP ini file path
|
||||||
|
function install_php_extension
|
||||||
|
{
|
||||||
|
echo "Installing $1 PHP extension"
|
||||||
|
|
||||||
|
# See http://www.php.net/manual/en/install.pecl.phpize.php
|
||||||
|
cd "$1"
|
||||||
|
phpize
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
register_php_extension "$1" "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
php_ini_file=$(find_php_ini)
|
||||||
|
|
||||||
|
# disable broken opcache on PHP 5.5.7
|
||||||
|
if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.5.8', '<');"` == "1" ]
|
||||||
|
then
|
||||||
|
sed -i '/opcache.so/d' "$php_ini_file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# apc
|
||||||
|
if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.5.0-dev', '<');"` == "1" ]
|
||||||
|
then
|
||||||
|
echo 'Enabling APC PHP extension'
|
||||||
|
register_php_extension 'apc' "$php_ini_file"
|
||||||
|
echo 'apc.enable_cli=1' >> "$php_ini_file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# redis
|
||||||
|
git clone git://github.com/nicolasff/phpredis.git redis
|
||||||
|
install_php_extension 'redis' "$php_ini_file"
|
Loading…
Add table
Reference in a new issue