enable OPCache

pull/43/head
necro-nemesis 2 years ago committed by GitHub
parent 25b8e87a03
commit 7ec05f5601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -399,18 +399,20 @@ function optimize_php() {
sudo cp "$phpcgiconf" "$raspap_dir/backups/php.ini.$datetimephpconf"
sudo ln -sf "$raspap_dir/backups/php.ini.$datetimephpconf" "$raspap_dir/backups/php.ini"
echo -n "Enable HttpOnly for session cookies (Recommended)? [Y/n]: "
read answer
if [ "$answer" != 'n' ] && [ "$answer" != 'N' ]; then
echo -n "Enabling HttpOnly for session cookies "
# echo -n "Enable HttpOnly for session cookies (Recommended)? [Y/n]: "
# read answer
# if [ "$answer" != 'n' ] && [ "$answer" != 'N' ]; then
echo "Php-cgi enabling session.cookie_httponly."
sudo sed -i -E 's/^session\.cookie_httponly\s*=\s*(0|([O|o]ff)|([F|f]alse)|([N|n]o))\s*$/session.cookie_httponly = 1/' "$phpcgiconf"
fi
if [ "$php_package" = "php7.0-cgi" ]; then
echo -n "Enable PHP OPCache? [Y/n]: "
read answer
if [ "$answer" != 'n' ] && [ "$answer" != 'N' ]; then
echo "Php-cgi enabling opcache.enable."
# fi
# if [ "$php_package" = "php7.0-cgi" ]; then
echo -n "Enabling PHP OPCache"
# echo -n "Enable PHP OPCache? [Y/n]: "
# read answer
# if [ "$answer" != 'n' ] && [ "$answer" != 'N' ]; then
# echo "Php-cgi enabling opcache.enable."
sudo sed -i -E 's/^;?opcache\.enable\s*=\s*(0|([O|o]ff)|([F|f]alse)|([N|n]o))\s*$/opcache.enable = 1/' "$phpcgiconf"
# Make sure opcache extension is turned on.
if [ -f "/usr/sbin/phpenmod" ]; then
@ -418,8 +420,8 @@ function optimize_php() {
else
install_warning "phpenmod not found."
fi
fi
fi
# fi
# fi
}
function install_complete() {

Loading…
Cancel
Save