mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00: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
1 changed files with 13 additions and 1 deletions
|
@ -11,6 +11,13 @@ function find_php_ini
|
||||||
echo $(php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||")
|
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
|
# $1 - PHP extension name
|
||||||
# $2 - PHP ini file path
|
# $2 - PHP ini file path
|
||||||
function install_php_extension
|
function install_php_extension
|
||||||
|
@ -25,11 +32,16 @@ function install_php_extension
|
||||||
make install
|
make install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
echo "extension=$1.so" >> "$2"
|
register_php_extension "$1" "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
php_ini_file=$(find_php_ini)
|
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
|
# redis
|
||||||
git clone git://github.com/nicolasff/phpredis.git redis
|
git clone git://github.com/nicolasff/phpredis.git redis
|
||||||
install_php_extension 'redis' "$php_ini_file"
|
install_php_extension 'redis' "$php_ini_file"
|
||||||
|
|
Loading…
Add table
Reference in a new issue