1

I have a small VPS that managed via ISPCONFIG3 and CENTOS, recently I try to update its PHP version from 5.4 to 5.6 and 7.2 for Wordpress installation. I had a lot of errors but finally done. after that, my PHPMYADMIN didn't work. so I try to reinstall it. but I got many dependency errors every time. I try every command that I got on the web but nothing change.

yum --enablerepo=remi,remi-php56  install phpMyAdmin

I also try this command with remi,remi-test,remi-php72 and ect.

every time I got these errors:

Loaded plugins: fastestmirror, langpacks, priorities
Loading mirror speeds from cached hostfile
 * base: centos.mirrors.ovh.net
 * epel: mirrors.coreix.net
 * extras: centos.mirrors.ovh.net
 * remi: remi.mirror.ate.info
 * remi-php56: remi.mirror.ate.info
 * remi-php72: remi.mirror.ate.info
 * remi-safe: remi.mirror.ate.info
 * updates: centos.mirrors.ovh.net
 * webtatic: uk.repo.webtatic.com
1803 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:4.4.15.10-3.el7 will be installed
--> Processing Dependency: php-php-gettext for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-tcpdf for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Processing Dependency: php-tcpdf-dejavu-sans-fonts for package: phpMyAdmin-4.4.15.10-3.el7.noarch
--> Running transaction check
---> Package php-php-gettext.noarch 0:1.0.12-1.el7 will be installed
---> Package php-tcpdf.noarch 0:6.2.26-1.el7 will be installed
--> Processing Dependency: php-tidy for package: php-tcpdf-6.2.26-1.el7.noarch
---> Package php-tcpdf-dejavu-sans-fonts.noarch 0:6.2.26-1.el7 will be installed
--> Running transaction check
---> Package php-tidy.x86_64 0:5.4.16-9.el7 will be installed
--> Processing Dependency: php(zend-abi) = 20100525-64 for package: php-tidy-5.4.16-9.el7.x86_64
--> Processing Dependency: php(api) = 20100412-64 for package: php-tidy-5.4.16-9.el7.x86_64
--> Finished Dependency Resolution
Error: Package: php-tidy-5.4.16-9.el7.x86_64 (epel)
           Requires: php(api) = 20100412-64
           Installed: php-common-7.2.24-1.el7.remi.x86_64 (@remi-php72)
               php(api) = 20170718-64
           Available: php-common-5.4.16-46.el7.x86_64 (base)
               php(api) = 20100412-64
           Available: php-common-5.4.45-17.el7.remi.x86_64 (remi)
               php(api) = 20100412-64
           Available: php-common-5.4.45-18.el7.remi.x86_64 (remi)
               php(api) = 20100412-64
           Available: php-common-5.6.40-13.el7.remi.x86_64 (remi-php56)
               php(api) = 20131106-64
           Available: php-common-5.6.40-14.el7.remi.x86_64 (remi-php56)
               php(api) = 20131106-64
           Available: php-common-7.2.23-1.el7.remi.x86_64 (remi-php72)
               php(api) = 20170718-64
           Available: php55w-common-5.5.38-1.w7.x86_64 (webtatic)
               php(api) = 20121113-64
           Available: php56w-common-5.6.40-1.w7.x86_64 (webtatic)
               php(api) = 20131106-64
           Available: php70w-common-7.0.33-1.w7.x86_64 (webtatic)
               php(api) = 20151012-64
           Available: php71w-common-7.1.26-1.w7.x86_64 (webtatic)
               php(api) = 20160303-64
           Available: php71w-common-7.1.27-1.w7.x86_64 (webtatic)
               php(api) = 20160303-64
           Available: php71w-common-7.1.28-1.w7.x86_64 (webtatic)
               php(api) = 20160303-64
           Available: php71w-common-7.1.29-1.w7.x86_64 (webtatic)
               php(api) = 20160303-64
           Available: php71w-common-7.1.30-1.w7.x86_64 (webtatic)
               php(api) = 20160303-64
           Available: php71w-common-7.1.31-1.w7.x86_64 (webtatic)
               php(api) = 20160303-64
           Available: php71w-common-7.1.32-1.w7.x86_64 (webtatic)
               php(api) = 20160303-64
           Available: php71w-common-7.1.33-1.w7.x86_64 (webtatic)
               php(api) = 20160303-64
           Available: php72w-common-7.2.14-1.w7.x86_64 (webtatic)
               php(api) = 20170718-64
           Available: php72w-common-7.2.16-1.w7.x86_64 (webtatic)
               php(api) = 20170718-64
           Available: php72w-common-7.2.17-1.w7.x86_64 (webtatic)
               php(api) = 20170718-64
           Available: php72w-common-7.2.19-1.w7.x86_64 (webtatic)
               php(api) = 20170718-64
           Available: php72w-common-7.2.21-1.w7.x86_64 (webtatic)
               php(api) = 20170718-64
           Available: php72w-common-7.2.22-1.w7.x86_64 (webtatic)
               php(api) = 20170718-64
           Available: php72w-common-7.2.24-1.w7.x86_64 (webtatic)
               php(api) = 20170718-64
Error: Package: php-tidy-5.4.16-9.el7.x86_64 (epel)
           Requires: php(zend-abi) = 20100525-64
           Installed: php-common-7.2.24-1.el7.remi.x86_64 (@remi-php72)
               php(zend-abi) = 20170718-64
           Available: php-common-5.4.16-46.el7.x86_64 (base)
               php(zend-abi) = 20100525-64
           Available: php-common-5.4.45-17.el7.remi.x86_64 (remi)
               php(zend-abi) = 20100525-64
           Available: php-common-5.4.45-18.el7.remi.x86_64 (remi)
               php(zend-abi) = 20100525-64
           Available: php-common-5.6.40-13.el7.remi.x86_64 (remi-php56)
               php(zend-abi) = 20131226-64
           Available: php-common-5.6.40-14.el7.remi.x86_64 (remi-php56)
               php(zend-abi) = 20131226-64
           Available: php-common-7.2.23-1.el7.remi.x86_64 (remi-php72)
               php(zend-abi) = 20170718-64
           Available: php55w-common-5.5.38-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20121212-64
           Available: php56w-common-5.6.40-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20131226-64
           Available: php70w-common-7.0.33-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20151012-64
           Available: php71w-common-7.1.26-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20160303-64
           Available: php71w-common-7.1.27-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20160303-64
           Available: php71w-common-7.1.28-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20160303-64
           Available: php71w-common-7.1.29-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20160303-64
           Available: php71w-common-7.1.30-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20160303-64
           Available: php71w-common-7.1.31-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20160303-64
           Available: php71w-common-7.1.32-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20160303-64
           Available: php71w-common-7.1.33-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20160303-64
           Available: php72w-common-7.2.14-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20170718-64
           Available: php72w-common-7.2.16-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20170718-64
           Available: php72w-common-7.2.17-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20170718-64
           Available: php72w-common-7.2.19-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20170718-64
           Available: php72w-common-7.2.21-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20170718-64
           Available: php72w-common-7.2.22-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20170718-64
           Available: php72w-common-7.2.24-1.w7.x86_64 (webtatic)
               php(zend-abi) = 20170718-64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Now I work with my databases like that I did with NC(MS-DOS) ;)

Please help me to reinstall my PHPMYADMIN.

2 Answers2

0

You are not installing phpMyAdmin from remi (that one has currenlty version phpMyAdmin-4.9.1 for EL7). Possibly Your priorities are messed up (remi should have higher or at least equal priority compared to epel, base etc..).
Else:
What happens if You specify version number with yum install? yum --enablrepo remi phpMyAdmin-4.9

EOhm
  • 795
  • 2
  • 7
  • Thanks for your advice , " yum --enablrepo remi phpMyAdmin-4.9 " not working but I try to install phpmyadmin 4.9.1 manualy and it works now. – Mohammad Ali Nekouie Oct 27 '19 at 16:41
  • So it's a problem with the priorities of Your repos? Repos such as remi which are intended to replace packages with same name from the base and epel repos and usually take care to not include something independent (i.e. to the php pakagess) in the repos are designe dto run with same or higher priority (so lower number in priority filed of repo config) as the base repos. – EOhm Oct 27 '19 at 16:51
0

For solving this problem, as @EOhm said we must install PHPMyAdmin 4.9.1 manually:

yum install -y wget php php-pdo php-pecl-zip php-json php-common php-fpm php-mbstring php-cli php-mysqlnd
yum install -y php-json php-mbstring
wget https://files.phpmyadmin.net/phpMyAdmin/4.9.1/phpMyAdmin-4.9.1-all-languages.tar.gz
tar -zxvf phpMyAdmin-4.9.1-all-languages.tar.gz
mv phpMyAdmin-4.9.1-all-languages /usr/share/phpMyAdmin
cp -pr /usr/share/phpMyAdmin/config.sample.inc.php /usr/share/phpMyAdmin/config.inc.php

edit config file:

nano /usr/share/phpMyAdmin/config.inc.php

update blowfish secret:

$cfg['blowfish_secret'] = 'bo95yavJ;V,1PzSlxyFwtyMJ}WmG98-6';

load MySQL with PHPMyAdmin tables:

mysql < /usr/share/phpMyAdmin/sql/create_tables.sql -u root -p

maybe need some MySQL definitions:(optional)

sudo mysql -u root
CREATE DATABASE phpmyadmin DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL ON phpmyadmin.* TO 'phpmyadmin'@'localhost' IDENTIFIED BY 'your_preferred_password';
FLUSH PRIVILEGES;
EXIT;

create apache web server alias:

nano /etc/httpd/conf.d/phpMyAdmin.conf

Copy and paste the below content to the above file:

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

<Directory /usr/share/phpMyAdmin/>
   AddDefaultCharset UTF-8

   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny> 
      Require all granted
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1
     Allow from ::1
   </IfModule>
</Directory>

<Directory /usr/share/phpMyAdmin/setup/>
   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require all granted
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 127.0.0.1
     Allow from ::1
   </IfModule>
</Directory>

other configs:

mkdir /usr/share/phpMyAdmin/tmp
chmod 777 /usr/share/phpMyAdmin/tmp
chown -R apache:apache /usr/share/phpMyAdmin
systemctl restart httpd
yum install -y policycoreutils-python-utils
semanage fcontext -a -t httpd_sys_rw_content_t '/usr/share/phpMyAdmin/'
semanage fcontext -a -t httpd_sys_rw_content_t "/usr/share/phpMyAdmin/tmp(/.*)?"
restorecon -Rv '/usr/share/phpMyAdmin/'
firewall-cmd --permanent --add-service=http
firewall-cmd --reload

after these steps my problem solved. Thanks.