Double version de PHP 7.3 Le sujet est résolu

Demande d'aide : c'est ici.
Répondre
gtraxx
Messages : 2
Inscription : 31 mars 2020, 10:00
Status : Hors-ligne

Bonjour, je possède un serveur avec ISPCONFIG qui par défaut contient quelques versions de php pré installé notamment php 7.3.8.
J'avais besoin d'avoir une version de php 7.3 avec le support webp donc j'ai suivi le tuto https://www.howtoforge.com/tutorial/how ... on-debian/ en l'adaptant pour ma version.
Je prend bien soin de modifier chaque chemin pour avoir php 7.3.16 et une fois tout terminé, j'affiche un php info et bam c'est toujours php 7.3.8 qui est affiché.
Je vérifie tout de même avec le terminal avec

Code : Tout sélectionner

cd /opt/php-7.3/bin
./php --version
et je constate que c'est bien php 7.3.16 ce qui est encore plus bizarre.
Je vous donne ma compilation complète pour voir ou je me suis planté :

Code : Tout sélectionner

mkdir -p /opt/php-7.3
mkdir /usr/local/src/php7.3-build
cd /usr/local/src/php7.3-build
wget http://de2.php.net/get/php-7.3.16.tar.bz2/from/this/mirror -O php-7.3.16.tar.bz2
tar jxf php-7.3.16.tar.bz2
cd php-7.3.16/
./configure --prefix=/opt/php-7.3 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-zlib --with-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-jpeg-dir=/usr --with-png-dir=/usr --with-webp-dir=/usr --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-imap --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm
make
make install

cp /usr/local/src/php7.3-build/php-7.3.16/php.ini-production /opt/php-7.3/lib/php.ini

cp /opt/php-7.3/etc/php-fpm.conf.default /opt/php-7.3/etc/php-fpm.conf

cp /opt/php-7.3/etc/php-fpm.d/www.conf.default /opt/php-7.3/etc/php-fpm.d/www.conf

nano /opt/php-7.3/etc/php-fpm.conf

pid = run/php-fpm.pid

nano /opt/php-7.3/etc/php-fpm.d/www.conf

listen = 127.0.0.1:8998

nano /lib/systemd/system/php-7.3-fpm.service

[Unit]
Description=The PHP 7.3 FastCGI Process Manager
After=network.target

[Service]
Type=simple
PIDFile=/opt/php-7.3/var/run/php-fpm.pid
ExecStart=/opt/php-7.3/sbin/php-fpm --nodaemonize --fpm-config /opt/php-7.3/etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID

[Install]
WantedBy=multi-user.target

systemctl enable php-7.3-fpm.service
systemctl daemon-reload

systemctl start php-7.3-fpm.service
nano /opt/php-7.3/lib/php.ini
[...]
zend_extension=opcache.so

cd /opt/php-7.3/bin
./php --version
Cordialement Aurelien
Avatar de l’utilisateur
piratebab
Site Admin
Site Admin
Messages : 5865
Inscription : 24 avr. 2016, 18:41
Localisation : sud ouest
Status : En ligne

Bonjour,
la commande php --version te donne la version vue par le systeme (en fait un simple lien symbolique)
php info te donne la version vue par ton site web.
Ce sont 2 choses différentes
gtraxx
Messages : 2
Inscription : 31 mars 2020, 10:00
Status : Hors-ligne

Bonjour en faites tout est en ordre, je vous explique, j'ai relancé apache etc plusieurs fois mais je ne voyais que l'ancienne version.
Je me suis dits tiens on va relancer le serveur entièrement, et la boum cela fonctionne.
Donc mon tuto ci-dessus fonctionne parfaitement, cela peu servir :)
Encore merci
Répondre