Error starting phpMyAdmin from Hestia Control Panel v1.4.5

Hello!
I try open in browser phpMyAdmin and get this error:

phpMyAdmin - Error

Existing configuration file (/etc/phpmyadmin/config.inc.php) is not readable.

File exists:

ls -lh /etc/phpmyadmin/config.inc.php

-rw-r----- 1 root www-data 4.8K Oct 2 2020 /etc/phpmyadmin/config.inc.php

v-change-sys-db-alias ‘pma’ “phpmyadmin” will solve the issue.

We forgot to refresh the config file with the new config

# v-change-sys-db-alias 'pma' "phpmyadmin"
ls: cannot access '/usr/sbin/php*fpm*': No such file or directory
ls: cannot access '/usr/sbin/php*fpm*': No such file or directory
# ls /usr/sbin/ | grep php
phpdismod
phpenmod
phpquery

If modphp is enabled you have to use:

You can enable this via the settings. It will force the use of www-data instead of user as php user.

Eris, I can’t find where enable modphp via panel settings.
Should I make changes to some config files?

You can set the template for the hostname to the template above.

The issue is that /etc/phpmyadmin/xxxx is readable by the user in 1.4.4 and lower and it could result in a security issue.

Therefore we disabled it. If you enable the template above for the hostname. (As it should not contain a website by default it should work fine…)

We usually suggest using php-fpm instead as it is more secure and suitable for more traffic.

It has been the default settings since 1.2.0 or 1.1.1

Have a look at Release notes for HestiaCP v1.1.0 — Hestia Control Panel documentation for how to migrate to php fpm - there is a script which should do the job. We anyway suggest to use fpm due to performance and security.

We are not using PHP for our sites, only for phpMyAdmin.
All servers will installed with

bash hst-install.sh --port 1500 --phpfpm no --multiphp no

How do we continue to use our servers without phpfrm? Or is it possible somehow to enable phpfrm just for phpMyAdmin?

File is located in /usr/local/hestia/install/upgrade/manual/

You need to have some php runtime to get php scripts working. I suggest to switch over to fpm, then set the website under advanced to “no socket” - so there will be no php enabled for the specific domain.

Edit:

We have more than 15 virtual machines of developers, and now it turns out that we have a very big problem with phpMyAdmin :scream:

There are also sites with TinyMCE.

If I run the script hestiacp/migrate_apache.sh at main · hestiacp/hestiacp · GitHub, will it turn out that sites with TinyMCE stop working or some other problems arise?

usualy not, but there is no warantee. If you have critical infra, take out your sysadmin skills, clone the system and do a prerun including documentation and testing - then you can be sure all is working well :).

yes, it looks like I really have problems

That arent problems, that’s called maintenance :slight_smile:. You could also go the way @eris suggested above to get pma working on mod_php - but we still suggest to switch over to fpm.

I will make a backup of one VM and try the migration script there

If we use custom templates for our sites, will they need to be manually updated after migration?

If it is a template for Apache2 yes. There are located in /usr/local/hesita/data/web/templates/apache2/php-fpm instead

For Nginx no…

Can I change phpMyAdmin config only, for no phpfrm environmen?

It didn’t work out, I’m restoring the backup. I’ll try to replace myPHPadmin with Adminer

bash migrate_apache.sh
E: Repository 'https://packages.sury.org/apache2 buster InRelease' changed its 'Suite' value from '' to 'buster'
E: Repository 'https://packages.sury.org/php buster InRelease' changed its 'Suite' value from '' to 'buster'
Installing PHP-7.4, please wait...                                                                                                                                                                 |
ERROR: Installation failed, please run the following command manually for debugging:
apt-get install php7.4-mbstring php7.4-bcmath php7.4-cli php7.4-curl
     php7.4-fpm php7.4-gd php7.4-intl php7.4-mysql
     php7.4-soap php7.4-xml php7.4-zip php7.4-mbstring
     php7.4-json php7.4-bz2 php7.4-pspell php7.4-imagick
     php7.4-imap php7.4-ldap
Enabling module proxy.
Enabling module proxy_fcgi.
cp: cannot create regular file '/etc/php/7.4/fpm/pool.d/': No such file or directory
sed: can't read /etc/php/7.4/fpm/pool.d/dummy.conf: No such file or directory
cp: cannot create regular file '/etc/php/7.4/fpm/pool.d/www.conf': No such file or directory
Failed to start php7.4-fpm.service: Unit php7.4-fpm.service not found.
Error: php7.4-fpm start failed


apt-get install php7.4-mbstring php7.4-bcmath php7.4-cli php7.4-curl php7.4-fpm php7.4-gd php7.4-intl php7.4-mysql php7.4-soap php7.4-xml php7.4-zip php7.4-mbstring php7.4-json php7.4-bz2 php7.4-pspell php7.4-imagick php7.4-imap php7.4-ldap
...
Err:1 https://packages.sury.org/php buster/main amd64 php7.4-bcmath amd64 7.4.14-1+0~20210112.34+debian10~1.gbpaa175a
  404  Not Found [IP: 104.21.18.148 443]
Err:2 https://packages.sury.org/php buster/main amd64 php7.4-fpm amd64 7.4.14-1+0~20210112.34+debian10~1.gbpaa175a
  404  Not Found [IP: 104.21.18.148 443]
Err:3 https://packages.sury.org/php buster/main amd64 php7.4-soap amd64 7.4.14-1+0~20210112.34+debian10~1.gbpaa175a
  404  Not Found [IP: 104.21.18.148 443]
E: Failed to fetch https://packages.sury.org/php/pool/main/p/php7.4/php7.4-bcmath_7.4.14-1+0~20210112.34+debian10~1.gbpaa175a_amd64.deb  404  Not Found [IP: 104.21.18.148 443]
E: Failed to fetch https://packages.sury.org/php/pool/main/p/php7.4/php7.4-fpm_7.4.14-1+0~20210112.34+debian10~1.gbpaa175a_amd64.deb  404  Not Found [IP: 104.21.18.148 443]
E: Failed to fetch https://packages.sury.org/php/pool/main/p/php7.4/php7.4-soap_7.4.14-1+0~20210112.34+debian10~1.gbpaa175a_amd64.deb  404  Not Found [IP: 104.21.18.148 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.