Bonjour à vous,
Voilà, il y a longtemps j'avais mis à jour PHP sur mon serveur pour passer en PHP7.
Mais un de mes sites web ne fonctionnait plus car il n’était pas compatible PHP7.
A l'époque j'avais trouvé en cherchant sur le net comment forcer en PHP5.6 et faire fonctionner mon site. (je ne sais plus du tout la méthode que j'avais suivi...)
Maintenant j'aimerai revenir à une version récente de PHP. Mais je m’aperçois que j'ai sur le serveur les deux version installé PHP5.6 et PHP7.
Comment repasser en PHP7 proprement sans tout fracassé ? J'utilise aussi PHPMyadmin.
Ubuntu 16.04.6 LTS
apt list \*php\* --installed
En train de lister... Fait
dh-php/xenial,xenial,now 0.35+ubuntu16.04.1+deb.sury.org+1 all [installé, automatique]
libapache2-mod-php5.6/now 5.6.40-27+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 5.6.40-29+ubuntu16.04.1+deb.sury.org+1]
php-cli/xenial,xenial,now 2:7.4+76+ubuntu16.04.1+deb.sury.org+9 all [installé]
php-common/now 2:75+ubuntu16.04.1+deb.sury.org+1 all [installé, pouvant être mis à jour vers : 2:76+ubuntu16.04.1+deb.sury.org+9]
php-curl/xenial,xenial,now 2:7.4+76+ubuntu16.04.1+deb.sury.org+9 all [installé]
php-gd/xenial,xenial,now 2:7.4+76+ubuntu16.04.1+deb.sury.org+9 all [installé]
php-gettext/xenial,xenial,now 1.0.11-2+deb.sury.org~xenial+1 all [installé]
php-intl/xenial,xenial,now 2:7.4+76+ubuntu16.04.1+deb.sury.org+9 all [installé]
php-json/xenial,xenial,now 2:7.4+76+ubuntu16.04.1+deb.sury.org+9 all [installé]
php-mbstring/xenial,xenial,now 2:7.4+76+ubuntu16.04.1+deb.sury.org+9 all [installé]
php-mcrypt/now 1:7.1+55+ubuntu16.04.1+deb.sury.org+1 all [installé, local]
php-pear/xenial,xenial,now 1:1.10.8+submodules+notgz-1+ubuntu16.04.1+deb.sury.org+1 all [installé]
php-phpseclib/xenial,xenial,now 2.0.1-1build1 all [installé]
php-tcpdf/xenial,xenial,now 6.0.093+dfsg-1ubuntu1 all [installé]
php-xml/xenial,xenial,now 2:7.4+76+ubuntu16.04.1+deb.sury.org+9 all [installé]
php-zip/xenial,xenial,now 2:7.4+76+ubuntu16.04.1+deb.sury.org+9 all [installé]
php5.6/now 5.6.40-27+ubuntu16.04.1+deb.sury.org+1 all [installé, pouvant être mis à jour vers : 5.6.40-29+ubuntu16.04.1+deb.sury.org+1]
php5.6-cli/now 5.6.40-27+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 5.6.40-29+ubuntu16.04.1+deb.sury.org+1]
php5.6-common/now 5.6.40-27+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 5.6.40-29+ubuntu16.04.1+deb.sury.org+1]
php5.6-dev/now 5.6.40-27+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 5.6.40-29+ubuntu16.04.1+deb.sury.org+1]
php5.6-gd/now 5.6.40-27+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 5.6.40-29+ubuntu16.04.1+deb.sury.org+1]
php5.6-json/now 5.6.40-27+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 5.6.40-29+ubuntu16.04.1+deb.sury.org+1]
php5.6-mbstring/now 5.6.40-27+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 5.6.40-29+ubuntu16.04.1+deb.sury.org+1]
php5.6-mysql/now 5.6.40-27+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 5.6.40-29+ubuntu16.04.1+deb.sury.org+1]
php5.6-opcache/now 5.6.40-27+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 5.6.40-29+ubuntu16.04.1+deb.sury.org+1]
php5.6-readline/now 5.6.40-27+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 5.6.40-29+ubuntu16.04.1+deb.sury.org+1]
php5.6-xml/now 5.6.40-27+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 5.6.40-29+ubuntu16.04.1+deb.sury.org+1]
php7.0-common/now 7.0.33-27+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 7.0.33-29+ubuntu16.04.1+deb.sury.org+1]
php7.0-mbstring/now 7.0.33-27+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 7.0.33-29+ubuntu16.04.1+deb.sury.org+1]
php7.1-common/now 7.1.33-15+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 7.1.33-16+ubuntu16.04.1+deb.sury.org+1]
php7.1-mbstring/now 7.1.33-15+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 7.1.33-16+ubuntu16.04.1+deb.sury.org+1]
php7.1-mcrypt/now 7.1.33-15+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 7.1.33-16+ubuntu16.04.1+deb.sury.org+1]
php7.2-common/now 7.2.30-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 7.2.31-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-mbstring/now 7.2.30-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 7.2.31-1+ubuntu16.04.1+deb.sury.org+1]
php7.2-xml/now 7.2.30-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 7.2.31-1+ubuntu16.04.1+deb.sury.org+1]
php7.3-common/now 7.3.17-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 7.3.18-1+ubuntu16.04.1+deb.sury.org+1]
php7.3-mbstring/now 7.3.17-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 7.3.18-1+ubuntu16.04.1+deb.sury.org+1]
php7.3-xml/now 7.3.17-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, pouvant être mis à jour vers : 7.3.18-1+ubuntu16.04.1+deb.sury.org+1]
php7.4-cli/xenial,now 7.4.6-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, automatique]
php7.4-common/xenial,now 7.4.6-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, automatique]
php7.4-curl/xenial,now 7.4.6-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, automatique]
php7.4-gd/xenial,now 7.4.6-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, automatique]
php7.4-intl/xenial,now 7.4.6-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, automatique]
php7.4-json/xenial,now 7.4.6-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, automatique]
php7.4-mbstring/xenial,now 7.4.6-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, automatique]
php7.4-opcache/xenial,now 7.4.6-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, automatique]
php7.4-readline/xenial,now 7.4.6-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, automatique]
php7.4-xml/xenial,now 7.4.6-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, automatique]
php7.4-zip/xenial,now 7.4.6-1+ubuntu16.04.1+deb.sury.org+1 amd64 [installé, automatique]
phpmyadmin/xenial-updates,xenial-updates,xenial-security,xenial-security,now 4:4.5.4.1-2ubuntu2.1 all [installé]
pkg-php-tools/xenial,xenial,now 1.33+deb.sury.org~xenial+1 all [installé]
php --ini
Configuration File (php.ini) Path: /etc/php/7.4/cli
Loaded Configuration File: /etc/php/7.4/cli/php.ini
Scan for additional .ini files in: /etc/php/7.4/cli/conf.d
Additional .ini files parsed: /etc/php/7.4/cli/conf.d/10-opcache.ini,
/etc/php/7.4/cli/conf.d/10-pdo.ini,
/etc/php/7.4/cli/conf.d/15-xml.ini,
/etc/php/7.4/cli/conf.d/20-calendar.ini,
/etc/php/7.4/cli/conf.d/20-ctype.ini,
/etc/php/7.4/cli/conf.d/20-curl.ini,
/etc/php/7.4/cli/conf.d/20-dom.ini,
/etc/php/7.4/cli/conf.d/20-exif.ini,
/etc/php/7.4/cli/conf.d/20-ffi.ini,
/etc/php/7.4/cli/conf.d/20-fileinfo.ini,
/etc/php/7.4/cli/conf.d/20-ftp.ini,
/etc/php/7.4/cli/conf.d/20-gd.ini,
/etc/php/7.4/cli/conf.d/20-gettext.ini,
/etc/php/7.4/cli/conf.d/20-iconv.ini,
/etc/php/7.4/cli/conf.d/20-intl.ini,
/etc/php/7.4/cli/conf.d/20-json.ini,
/etc/php/7.4/cli/conf.d/20-mbstring.ini,
/etc/php/7.4/cli/conf.d/20-phar.ini,
/etc/php/7.4/cli/conf.d/20-posix.ini,
/etc/php/7.4/cli/conf.d/20-readline.ini,
/etc/php/7.4/cli/conf.d/20-shmop.ini,
/etc/php/7.4/cli/conf.d/20-simplexml.ini,
/etc/php/7.4/cli/conf.d/20-sockets.ini,
/etc/php/7.4/cli/conf.d/20-sysvmsg.ini,
/etc/php/7.4/cli/conf.d/20-sysvsem.ini,
/etc/php/7.4/cli/conf.d/20-sysvshm.ini,
/etc/php/7.4/cli/conf.d/20-tokenizer.ini,
/etc/php/7.4/cli/conf.d/20-xmlreader.ini,
/etc/php/7.4/cli/conf.d/20-xmlwriter.ini,
/etc/php/7.4/cli/conf.d/20-xsl.ini,
/etc/php/7.4/cli/conf.d/20-zip.ini
D'avance merci à vous de m'aider.
Thymon