aboutsummaryrefslogtreecommitdiffstats
path: root/vagrant
diff options
context:
space:
mode:
authorrubencm <rubencm@gmail.com>2019-08-14 12:23:00 +0000
committerrubencm <rubencm@gmail.com>2019-08-14 12:23:00 +0000
commit49ac98ffdb73ef9fbd4610b815ef43bc58b13a45 (patch)
treeeef0b2a0f23ff7c40ca31a9c72c63dfaed9bf09a /vagrant
parentda6be75a18896481caea7fda6582a9a6b9502e0a (diff)
downloadforums-49ac98ffdb73ef9fbd4610b815ef43bc58b13a45.tar
forums-49ac98ffdb73ef9fbd4610b815ef43bc58b13a45.tar.gz
forums-49ac98ffdb73ef9fbd4610b815ef43bc58b13a45.tar.bz2
forums-49ac98ffdb73ef9fbd4610b815ef43bc58b13a45.tar.xz
forums-49ac98ffdb73ef9fbd4610b815ef43bc58b13a45.zip
[ticket/16131] Force vagrant to install phpBB with php7.2
PHPBB3-16131
Diffstat (limited to 'vagrant')
-rwxr-xr-xvagrant/after.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/vagrant/after.sh b/vagrant/after.sh
index cebbcd67d3..5980e5c334 100755
--- a/vagrant/after.sh
+++ b/vagrant/after.sh
@@ -1,12 +1,13 @@
#!/bin/sh
+PHP_VERSION="7.2"
PHPBB_PATH="/home/vagrant/phpbb"
PHPBB_CONFIG="${PHPBB_PATH}/phpBB/config.php"
PHPBB_INSTALL="${PHPBB_PATH}/vagrant/phpbb-install-config.yml"
# Ensure composer deps are installed
cd ${PHPBB_PATH}/phpBB
-php ../composer.phar install
+php${PHP_VERSION} ../composer.phar install
# Backup and remove current config.php file
if [ -e ${PHPBB_CONFIG} ]
@@ -16,7 +17,7 @@ then
fi
# Install phpBB
-php ${PHPBB_PATH}/phpBB/install/phpbbcli.php install ${PHPBB_INSTALL}
+php${PHP_VERSION} ${PHPBB_PATH}/phpBB/install/phpbbcli.php install ${PHPBB_INSTALL}
# Add DEBUG mode to phpBB to remove annoying installer warnings
echo "@define('DEBUG', true);" >> ${PHPBB_CONFIG}
@@ -25,12 +26,12 @@ echo "@define('DEBUG', true);" >> ${PHPBB_CONFIG}
sed -i '/^.*PHPBB_ENVIRONMENT.*$/s/production/development/' ${PHPBB_CONFIG}
# Update the PHP memory limits (enough to allow phpunit tests to run)
-sed -i "s/memory_limit = .*/memory_limit = 1024M/" /etc/php/7.2/fpm/php.ini
+sed -i "s/memory_limit = .*/memory_limit = 1024M/" /etc/php/${PHP_VERSION}/fpm/php.ini
# Fix for urls with app.php
-sed -i "s/cgi.fix_pathinfo=.*/cgi.fix_pathinfo=1/" /etc/php/7.2/fpm/php.ini
+sed -i "s/cgi.fix_pathinfo=.*/cgi.fix_pathinfo=1/" /etc/php/${PHP_VERSION}/fpm/php.ini
# Restart php-fpm to apply php.ini changes
-systemctl restart php7.2-fpm.service
+systemctl restart php${PHP_VERSION}-fpm.service
echo "Your board is ready at http://192.168.10.10/"