Skip to content

Instantly share code, notes, and snippets.

@standa
Created January 18, 2018 14:28
Show Gist options
  • Save standa/83fa96c73a8d302e52384eea283d8a5a to your computer and use it in GitHub Desktop.
Save standa/83fa96c73a8d302e52384eea283d8a5a to your computer and use it in GitHub Desktop.
Upgrade PHP 7.1 -> 7.2
#!/usr/bin/env bash
# TODO: EXPERIMENTAL run command by command as it will spit errors!
# ERRRORS: php-xdebug not working for php 7.2 yet!
if [ $EUID -ne 0 ]; then
exec sudo $0
fi
systemctl stop apache2
systemctl stop supervisor
apt-get update
apt-get remove -y php*
apt-get install -y libapache2-mod-php7.2 php-pear \
php7.2 php7.2-apcu php7.2-cli php7.2-common php7.2-curl php7.2-gd \
php7.2-igbinary php7.2-json php7.2-mbstring php7.2-memcached \
php7.2-msgpack php7.2-mysql php7.2-opcache php7.2-readline php7.2-soap \
php7.2-sybase php7.2-xml php7.2-xsl php7.2-zip php-dev \
php7.2-intl
# beta of PHP 7.2 xdebug but works
pecl install xdebug-2.6.0beta1
phpenmod xdebug # should be run automatically by apt-get, but just to be sure...
phpenmod lentiamo-global
phpenmod lentiamo-xdebug
apt-get -y autoremove
systemctl start apache2
systemctl start supervisor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment