• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved php composer add dependencies not working

Looks like you have no php-version which shipped with the OS. Install PHP 7.3 on your system:

Code:
yum install yum-utils –y
yum install epel-release –y
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum-config-manager ––enable remi–php73
yum install php php-common php-opcache php-mcrypt php-cli php-gd php-curl php-mysql –y
php –v
I write same commands but it shows php 5.4.6 now.
Code:
[root@srv ~]# php -v
PHP 5.4.16 (cli) (built: Apr  1 2020 04:07:17)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with Zend OPcache v7.0.5, Copyright (c) 1999-2015, by Zend Technologies
 
Have you ran all commands in the correct order? Normaly

yum-config-manager --enable remi-php73

Configures to use version 7.3 php and install the modules for it.
 
Yes i ran with your order. Here is command history: Screen Recording 2021-10-28 at 12.04.25 PM

It is php -v result after yum-config-manager --enable remi-php73 result now:
Code:
PHP 5.4.16 (cli) (built: Apr  1 2020 04:07:17)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with Zend OPcache v7.0.5, Copyright (c) 1999-2015, by Zend Technologies
 
Code:
mv /usr/bin/php /usr/bin/php.backup
mv /usr/bin/php-cgi /usr/bin/php-cgi.backup
mv /sbin/php-fpm /sbin/php-fpm.backup

ln -s /opt/plesk/php/7.3/bin/php /usr/bin/php
ln -s /opt/plesk/php/7.3/bin/php-cgi /usr/bin/php-cgi
ln -s /opt/plesk/php/7.3/sbin/php-fpm /sbin/php-fpm
 
Code:
mv /usr/bin/php /usr/bin/php.backup
mv /usr/bin/php-cgi /usr/bin/php-cgi.backup
mv /sbin/php-fpm /sbin/php-fpm.backup

ln -s /opt/plesk/php/7.3/bin/php /usr/bin/php
ln -s /opt/plesk/php/7.3/bin/php-cgi /usr/bin/php-cgi
ln -s /opt/plesk/php/7.3/sbin/php-fpm /sbin/php-fpm
OK it is showing now 7.3 version. Thank you so much for your helps.
 
Back
Top