PHPMyAdmin not applies config.inc.php config

Hi everyone.

I have a problem with a PHPMyAdmin with Debian 12 and HestiaCP v1.9.4. PHPMyAdmin not applies the settings on config.inc.php. Allways applies defaut settings. The server have apache, php-fpm, nginx and mariadb.

root@web:~# ls -las /etc/ | grep phpmyadmin
 4 drwxr-xr-x   3 root       www-data  4096 ago 26 15:18 phpmyadmin
root@web:~# ls -las /etc/phpmyadmin/
total 24
 4 drwxr-xr-x   3 root www-data  4096 ago 26 15:18 .
12 drwxr-xr-x 105 root root     12288 ago 26 03:13 ..
 4 drwxr-x---   2 root www-data  4096 ago 26 15:19 conf.d
 4 -rw-r-----   1 root www-data  1040 ago 26 15:18 config.inc.php
root@web:~# ls -las /usr/share/ | grep phpmyadmin
 4 drwxr-xr-x  13 root root  4096 ago 26 14:54 phpmyadmin
root@web:~# ls -las /usr/share/phpmyadmin
total 748
  4 drwxr-xr-x  13 root       root       4096 ago 26 14:54 .
 12 drwxr-xr-x 203 root       root      12288 ago 26 03:04 ..
  4 -rw-r--r--   1 root       root         69 ago 26 02:33 babel.config.json
 20 -rw-r--r--   1 root       root      19492 ago 26 02:33 ChangeLog
  8 -rw-r--r--   1 root       root       5453 ago 26 02:33 composer.json
324 -rw-r--r--   1 root       root     328311 ago 26 02:33 composer.lock
  8 -rw-r--r--   1 root       root       5224 ago 26 04:34 config.inc.php
  4 -rw-r--r--   1 root       root       2587 ago 26 02:33 CONTRIBUTING.md
  4 drwxr-xr-x   3 root       root       4096 ago 26 02:33 doc
  4 drwxr-xr-x   2 root       root       4096 ago 26 02:33 examples
 24 -rw-r--r--   1 root       root      22486 ago 26 02:33 favicon.ico
  4 -rw-r--r--   1 root       root       1074 ago 26 02:33 index.php
  4 drwxr-xr-x   6 root       root       4096 ago 26 02:33 js
  4 drwxr-xr-x   4 root       root       4096 ago 26 02:33 libraries
 20 -rw-r--r--   1 root       root      18092 ago 26 02:33 LICENSE
  4 drwxr-xr-x  46 root       root       4096 ago 26 02:33 locale
  4 -rw-r--r--   1 root       root       2959 ago 26 02:33 package.json
  4 -rw-r--r--   1 root       root       1520 ago 26 02:33 README
  4 -rw-r--r--   1 root       root         29 ago 26 02:33 RELEASE-DATE-5.2.2
  4 -rw-r--r--   1 root       root         26 ago 26 02:33 robots.txt
  4 drwxr-xr-x   5 root       root       4096 ago 26 02:33 setup
  4 -rw-r--r--   1 root       root       1153 ago 26 02:33 show_config_errors.php
  4 drwxr-xr-x   2 root       root       4096 ago 26 02:33 sql
  4 drwxr-xr-x  25 root       root       4096 ago 26 02:33 templates
  4 drwxr-xr-x   6 root       root       4096 ago 26 02:33 themes
  4 drwxr-xr-x   2 hestiamail www-data   4096 ago 26 02:33 tmp
  4 -rw-r--r--   1 root       root        965 ago 26 02:33 url.php
  4 drwxr-xr-x  28 root       root       4096 ago 26 02:33 vendor
248 -rw-r--r--   1 root       root     251057 ago 26 02:33 yarn.lock
root@web:~# ls -las /var/lib/ | grep phpmyadmin
4 drwxr-xr-x  3 root         root         4096 ago 26 02:33 phpmyadmin
root@web:~# ls -las /var/lib/phpmyadmin
total 12
4 drwxr-xr-x  3 root root 4096 ago 26 02:33 .
4 drwxr-xr-x 44 root root 4096 ago 26 03:11 ..
4 drwxrwx---  2 root root 4096 ago 26 02:33 tmp
root@web:~# ls -las /usr/share/phpmyadmin/themes/metro/
total 96
 4 drwxr-xr-x 6 root root  4096 ago 26 02:33 .
 4 drwxr-xr-x 6 root root  4096 ago 26 02:33 ..
 4 drwxr-xr-x 2 root root  4096 ago 26 02:33 css
12 drwxr-xr-x 3 root root 12288 ago 26 02:33 img
 4 drwxr-xr-x 3 root root  4096 ago 26 02:33 jquery
60 -rw-r--r-- 1 root root 61332 ago 26 02:33 screen.png
 4 drwxr-xr-x 2 root root  4096 ago 26 02:33 scss
 4 -rw-r--r-- 1 root root   225 ago 26 02:33 theme.json


The structure of the file config.inc.php is the default, only added ThemeDefault for the test purposes. The pma database is ok and accessible from phpmyadmin.

<?php
/* PHPmyadmin config for Hestia 1.3.3 > */
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * All directives are explained in documentation in the doc/ folder
 * or at <https://docs.phpmyadmin.net/>.
 *
 * @package PhpMyAdmin
 */
declare(strict_types=1);

/**
 * This is needed for cookie based authentication to encrypt password in
 * cookie. Needs to be 32 chars long.
 */
$cfg["blowfish_secret"] = "sensible-data"; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/**
 * Directories for saving/loading files from server
 */
$cfg["UploadDir"] = "";
$cfg["SaveDir"] = "";
$cfg['ThemeDefault'] = 'metro';

/**
 * You can find more configuration options in the documentation
 * in the doc/ folder or at <https://docs.phpmyadmin.net/>.
 */

//start with 1 other wise it doesn't work
$i = 1;
foreach (glob("/etc/phpmyadmin/conf.d/*.php") as $filename) {
        include $filename;
        /*Don't remove / alter code here below this will add SSO support for all servers*/
        //Add Hestia SSO code here
        $i++;
}

Thanks you for reading and appreciate your help.

Hi @soguor

It works fine on my end.

Change the group for /etc/phpmyadmin dir (using root:www-data should give you an error…):

chown -R :hestiamail /etc/phpmyadmin

Tip, instead of using this:

ls -las /etc/ | grep phpmyadmin

use this:

ls -lasd /etc/phpmyadmin

@sahsanu thanks for quick response. I tried but work same.

root@web:~# chown -R :hestiamail /etc/phpmyadmin
root@web:~# ls -lasd /etc/phpmyadmin
4 drwxr-xr-x 3 root hestiamail 4096 ago 26 15:18 /etc/phpmyadmin

Are you using a CDN like Cloudflare?

Did you install phpmyadmin manually?

dpkg -l | grep -i phpmyadmin

Thanks @sahsanu again.:blush:

Are you using a CDN like Cloudflare?

No.

root@web:~# dpkg -l | grep -i phpmyadmin
root@web:~# 

I Didn’t install phpmyadmin manually.

I compared this server with one server with fresh install that work fine and didn’t found difference within that. Maybe if can activate the debug application outside the config file, I’ll get more information. The logs don’t show errors. I’m confuse.

That’s strange. Show the output of this command:

cat -A /etc/phpmyadmin/config.inc.php

I tried re create the file with the content on hestiacp/install/deb/phpmyadmin/config.inc.php at main · hestiacp/hestiacp · GitHub as you can see in the first post.

root@web:~# cat -A /etc/phpmyadmin/config.inc.php
<?php$
/* PHPmyadmin config for Hestia 1.3.3 > */$
/* vim: set expandtab sw=4 ts=4 sts=4: */$
/**$
 * All directives are explained in documentation in the doc/ folder$
 * or at <https://docs.phpmyadmin.net/>.$
 *$
 * @package PhpMyAdmin$
 */$
declare(strict_types=1);$
$
/**$
 * This is needed for cookie based authentication to encrypt password in$
 * cookie. Needs to be 32 chars long.$
 */$
$cfg["blowfish_secret"] = "no-paste-sensible-data"; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */$
$
/**$
 * Directories for saving/loading files from server$
 */$
$cfg["UploadDir"] = "";$
$cfg["SaveDir"] = "";$
$cfg['ThemeDefault'] = 'metro';$
$
/**$
 * You can find more configuration options in the documentation$
 * in the doc/ folder or at <https://docs.phpmyadmin.net/>.$
 */$
$
//start with 1 other wise it doesn't work$
$i = 1;$
foreach (glob("/etc/phpmyadmin/conf.d/*.php") as $filename) {$
        include $filename;$
        /*Don't remove / alter code here below this will add SSO support for all servers*/$
        //Add Hestia SSO code here$
        $i++;$
}$

All looks fine. Could you please share your domain so I can test it on my end? You can send me a private message if you don’t want to share it publicly.