mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-13 20:32:11 +02:00
[ticket/11985] Enable APC on command line so it can be used by PHPUnit.
PHPBB3-11985
This commit is contained in:
parent
a012293462
commit
3b6542adf8
@ -11,6 +11,13 @@ 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
|
||||
@ -25,11 +32,16 @@ function install_php_extension
|
||||
make install
|
||||
cd ..
|
||||
|
||||
echo "extension=$1.so" >> "$2"
|
||||
register_php_extension "$1" "$2"
|
||||
}
|
||||
|
||||
php_ini_file=$(find_php_ini)
|
||||
|
||||
# apc
|
||||
echo 'Enabling APC PHP extension'
|
||||
register_php_extension 'apc' "$php_ini_file"
|
||||
echo 'apc.enable_cli=1' >> "$php_ini_file"
|
||||
|
||||
# redis
|
||||
git clone git://github.com/nicolasff/phpredis.git redis
|
||||
install_php_extension 'redis' "$php_ini_file"
|
||||
|
Loading…
x
Reference in New Issue
Block a user