Phpmyadmin error code 500 after adding php8.2

After running command “v-add-web-php 8.2”, I got error code 500 when navigate to domain.com/phpmyadmin. My websites work nomally.

Here is a log.

[Sat Apr 19 14:46:13.280165 2025] [proxy:error] [pid 36552:tid 36584] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (127.0.0.1:9000) failed
[Sat Apr 19 14:46:13.280204 2025] [proxy_fcgi:error] [pid 36552:tid 36584] [client 133.0.233.130:0] AH01079: failed to make connection to backend: 127.0.0.1

Can anyone show me where to start digging?

Which version of Hestia are you using?
Are you using Nginx or Nginx+Apache2?

Show the output of these commands:

grep -Er '^\s*fastcgi_pass.*(:9000|www.sock)' /etc/{nginx,apache2}
while IFS= read -d '' -r file; do echo "Checking $file";cat "$file";echo;done < <(find /etc/php/ -name "www.conf" -print0)

What’s the default php?

v-list-default-php

Hestia version 1.9.3
Nginx + Apache2

v-list-default-php
VERSION
------
8.2
/etc/nginx/conf.d/phpmyadmin.inc:               fastcgi_pass  127.0.0.1:9000;
/etc/nginx/conf.d/phppgadmin.inc:               fastcgi_pass  127.0.0.1:9000;
# while IFS= read -d '' -r file; do echo "Checking $file";cat "$file";echo;done < <(find /etc/php/ -name "www.conf" -print0)
Checking /etc/php/8.2/fpm/pool.d/www.conf
; origin-src: deb/php-fpm/dummy.conf

[www]
listen = /run/php/www.sock
listen.owner = hestiamail
listen.group = www-data
listen.mode = 0660

user = hestiamail
group = hestiamail

pm = ondemand
pm.max_children = 4
pm.max_requests = 4000
pm.process_idle_timeout = 10s

Checking /etc/php/8.2/fpm/pool.d/bak/www.conf
; origin-src: deb/php-fpm/dummy.conf

[www]
listen = /run/php/www.sock
listen.owner = hestiamail
listen.group = www-data
listen.mode = 0660

user = hestiamail
group = hestiamail

pm = ondemand
pm.max_children = 4
pm.max_requests = 4000
pm.process_idle_timeout = 10s

As root:

cp -f /usr/local/hestia/install/deb/nginx/{phppgadmin,phpmyadmin}.inc /etc/nginx/conf.d/
systemctl restart nginx

And try again.

It didn’t fix. Do you need any more information?

Show again these outputs:

grep -Er '^\s*fastcgi_pass.*(:9000|www.sock)' /etc/{nginx,apache2}
while IFS= read -d '' -r file; do echo "Checking $file";cat "$file";echo;done < <(find /etc/php/ -name "www.conf" -print0)

Also, show the error you get in logs and the conf of the domain (replace USER and DOMAIN with the actual data):

cat /home/USER/conf/web/DOMAIN/nginx.conf
cat /home/USER/conf/web/DOMAIN/apache2.conf
# grep -Er '^\s*fastcgi_pass.*(:9000|www.sock)' /etc/{nginx,apache2}
/etc/nginx/conf.d/phpmyadmin.inc:               fastcgi_pass  unix:/run/php/www.sock;
/etc/nginx/conf.d/phppgadmin.inc:               fastcgi_pass  unix:/run/php/www.sock;
# while IFS= read -d '' -r file; do echo "Checking $file";cat "$file";echo;done < <(find /etc/php/ -name "www.conf" -print0)
Checking /etc/php/8.2/fpm/pool.d/www.conf
; origin-src: deb/php-fpm/dummy.conf

[www]
listen = /run/php/www.sock
listen.owner = hestiamail
listen.group = www-data
listen.mode = 0660

user = hestiamail
group = hestiamail

pm = ondemand
pm.max_children = 4
pm.max_requests = 4000
pm.process_idle_timeout = 10s

Log:

[Sat Apr 19 22:11:43.033041 2025] [proxy:error] [pid 40768:tid 40774] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (127.0.0.1:9000) failed
[Sat Apr 19 22:11:43.033083 2025] [proxy_fcgi:error] [pid 40768:tid 40774] [client 133.0.233.130:0] AH01079: failed to make connection to backend: 127.0.0.1
cat /home/USER/conf/web/domain.com/nginx.conf
#=========================================================================#
# Default Web Domain Template                                             #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS   #
# https://hestiacp.com/docs/server-administration/web-templates.html      #
#=========================================================================#

server {
	listen      10.0.0.12:80;
	server_name domain.com ky.domain.com kh.domain.com;
	error_log   /var/log/apache2/domains/domain.com.error.log error;

	include /home/USER/conf/web/domain.com/nginx.forcessl.conf*;

	location ~ /\.(?!well-known\/|file) {
		deny all;
		return 404;
	}

	location / {
		proxy_pass http://10.0.0.12:8080;

		location ~* ^.+\.(css|htm|html|js|mjs|json|xml|apng|avif|bmp|cur|gif|ico|jfif|jpg|jpeg|pjp|pjpeg|png|svg|tif|tiff|webp|aac|caf|flac|m4a|midi|mp3|ogg|opus|wav|3gp|av1|avi|m4v|mkv|mov|mpg|mpeg|mp4|mp4v|webm|otf|ttf|woff|woff2|doc|docx|odf|odp|ods|odt|pdf|ppt|pptx|rtf|txt|xls|xlsx|7z|bz2|gz|rar|tar|tgz|zip|apk|appx|bin|dmg|exe|img|iso|jar|msi|webmanifest)$ {
			try_files  $uri @fallback;

			root       /home/USER/web/domain.com/public_html;
			access_log /var/log/apache2/domains/domain.com.log combined;
			access_log /var/log/apache2/domains/domain.com.bytes bytes;

			expires    max;
		}
	}

	location @fallback {
		proxy_pass http://10.0.0.12:8080;
	}

	location /error/ {
		alias /home/USER/web/domain.com/document_errors/;
	}

	include /home/USER/conf/web/domain.com/nginx.conf_*;
}

cat /home/USER/conf/web/domain.com/apache2.conf
#=========================================================================#
# Default Web Domain Template                                             #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS   #
# https://hestiacp.com/docs/server-administration/web-templates.html      #
#=========================================================================#

<VirtualHost 10.0.0.12:8080>

    ServerName domain.com
    ServerAlias ky.domain.com kh.domain.com
    ServerAdmin [email protected]
    DocumentRoot /home/USER/web/domain.com/public_html
    ScriptAlias /cgi-bin/ /home/USER/web/domain.com/cgi-bin/
    Alias /vstats/ /home/USER/web/domain.com/stats/
    Alias /error/ /home/USER/web/domain.com/document_errors/
    #SuexecUserGroup USER USER
    CustomLog /var/log/apache2/domains/domain.com.bytes bytes
    CustomLog /var/log/apache2/domains/domain.com.log combined
    ErrorLog /var/log/apache2/domains/domain.com.error.log

    IncludeOptional /home/USER/conf/web/domain.com/apache2.forcessl.conf*

    <Directory /home/USER/web/domain.com/stats>
        AllowOverride All
    </Directory>
    <Directory /home/USER/web/domain.com/public_html>
        AllowOverride All
        Options +Includes -Indexes +ExecCGI
    </Directory>

RewriteEngine on
RewriteCond %{HTTP_HOST} ^ky.domain.com
RewriteRule ^(.*)$ /ky/$1 [L,NC,QSA]
RewriteCond %{HTTP_HOST} ^kh.domain.com
RewriteRule ^(.*)$ /tol/$1 [L,NC,QSA]

    <FilesMatch \.php$>
        SetHandler "proxy:unix:/run/php/php8.2-fpm-domain.com.sock|fcgi://localhost"
    </FilesMatch>
    SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0

    IncludeOptional /home/USER/conf/web/domain.com/apache2.conf_*
    IncludeOptional /etc/apache2/conf.d/*.inc
</VirtualHost>

Execute this as root (it will recreate the phpmyadmin.inc files for Nginx and Apache):

v-change-sys-db-alias pma phpmyadmin

Try again.

If still doesn’t work, show the output of these commands:

cat /usr/local/hestia/install/deb/pma/apache.conf
cat /etc/nginx/conf.d/phpmyadmin.inc
cat /etc/apache2/conf.d/phpmyadmin.inc
1 Like

It works. The last command fixed it. Thank you.
Can you explain briefly what is the problem and how did it fix?

1 Like

The first issue was my fault, I forgot you were using Apache2 :frowning:

The real problem was that you were using an old configuration for PHPMyAdmin and Apache2 that used TCP to communicate with PHP, but in Hestia version 1.9.x a socket is used instead, so Apache2 couldn’t communicate with PHP on port 9000. The command that fixed it recreates the phpmyadmin.inc files with the correct configuration.

1 Like

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