# HestiaCP Configure: Internal Server Error 500

**URL:** <https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069>\
**Category:** Install & Set-Up\
**Created:** [August 11, 2026, 8:54pm UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069 "2026-08-11T20:54:14Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjordi](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sjordi/32/7128_2.png) [@sjordi](https://forum.hestiacp.com/u/sjordi)\
**Post date:** [August 11, 2026, 8:54pm UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069/1 "2026-08-11T20:54:14Z")

</div>

Hi,

On my (recently updated 1.9.9) HestiaCP, if I connect to the admin page, click the Config cog and then click “Configure” (the button), I end up on an internal server error 500

The log shows this error:

`2026/08/11 20:48:59 [error] 1119#0: *143 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in /usr/local/hestia/web/edit/server/index.php:157`  
`Stack trace:`  
`#0 /usr/local/hestia/web/edit/server/index.php(157): array_filter()`  
`#1 {main}`  
`thrown in /usr/local/hestia/web/edit/server/index.php on line 157" while reading response header from upstream, client: 90.73.239.214, server: _, request: "GET /edit/server/ HTTP/2.0", upstream: "fastcgi://unix:/run/hestia-php.sock:", host: "nnn.nnn.nnn.nnn:8083", referrer: "``https://nnn.nnn.nnn.nnn:8083/list/server/``"`  
`2026/08/11 20:49:33 [error] 17572#0: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in /usr/local/hestia/web/edit/server/index.php:157`  
`Stack trace:`  
`#0 /usr/local/hestia/web/edit/server/index.php(157): array_filter()`  
`#1 {main}`  
`thrown in /usr/local/hestia/web/edit/server/index.php on line 157" while reading response header from upstream, client: 90.73.239.214, server: _, request: "GET /edit/server/ HTTP/2.0", upstream: "fastcgi://unix:/run/hestia-php.sock:", host: "``nnn.nnn.nnn.nnn``:8083", referrer: "``https://nnn.nnn.nnn.nnn:8083/list/server/``"`

Another server, Configure works fine and show s the correct sections.

Thanks for any idea?  
Steve J

---

<div class="post-metadata">

**Author:** ![Blats](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/blats/32/5038_2.png) [@Blats](https://forum.hestiacp.com/u/Blats)\
**Post date:** [August 11, 2026, 9:46pm UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069/2 "2026-08-11T21:46:00Z")

</div>

Hi,

please provide us the output of this command:

`sed -n '150,165p' /usr/local/hestia/web/edit/server/index.php`

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [August 12, 2026, 3:06am UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069/3 "2026-08-12T03:06:10Z")

</div>

> <https://github.com/hestiacp/hestiacp/blob/ea163c202a5647cb45796af9d5456c5d7d80d08e/web/edit/server/index.php#L153-L168>

Looks like a issue with database.conf in /usr/local/hestia/conf/

---

<div class="post-metadata">

**Author:** ![sjordi](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sjordi/32/7128_2.png) [@sjordi](https://forum.hestiacp.com/u/sjordi)\
**Post date:** [August 12, 2026, 8:21am UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069/4 "2026-08-12T08:21:50Z")

</div>

> [@Blats](#):
>
> sed -n ‘150,165p’ /usr/local/hestia/web/edit/server/index.php

`// List Database hosts`  
`exec(HESTIA_CMD . "v-list-database-hosts json", $output, $return_var);`  
`$db_hosts = json_decode(implode("", $output), true);`  
`unset($output);`  
`$v_mysql_hosts = array_values(`  
`array_filter($db_hosts, function ($host) {`  
`return $host["TYPE"] === "mysql";`  
`}),`  
`);`  
`$v_mysql = count($v_mysql_hosts) ? "yes" : "no";`  
`$v_pgsql_hosts = array_values(`  
`array_filter($db_hosts, function ($host) {`  
`return $host["TYPE"] === "pgsql";`  
`}),`

---

<div class="post-metadata">

**Author:** ![Blats](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/blats/32/5038_2.png) [@Blats](https://forum.hestiacp.com/u/Blats)\
**Post date:** [August 12, 2026, 8:30am UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069/5 "2026-08-12T08:30:11Z")

</div>

> [@sjordi](#):
>
> `// List Database hosts`  
> `exec(HESTIA_CMD . "v-list-database-hosts json", $output, $return_var);`  
> `$db_hosts = json_decode(implode("", $output), true);`  
> `unset($output);`  
> `$v_mysql_hosts = array_values(`  
> `array_filter($db_hosts, function ($host) {`  
> `return $host["TYPE"] === "mysql";`  
> `}),`  
> `);`  
> `$v_mysql = count($v_mysql_hosts) ? "yes" : "no";`  
> `$v_pgsql_hosts = array_values(`  
> `array_filter($db_hosts, function ($host) {`  
> `return $host["TYPE"] === "pgsql";`  
> `}),`

Do you have any database server installed? like mysql, mariadb, postgresql?

show the output of:

`v-list-database-hosts json`

---

<div class="post-metadata">

**Author:** ![sjordi](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sjordi/32/7128_2.png) [@sjordi](https://forum.hestiacp.com/u/sjordi)\
**Post date:** [August 12, 2026, 8:50am UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069/6 "2026-08-12T08:50:17Z")

</div>

Obviously something with a remaining old DB that was installed directly with the basic provider DB tools:

`[`  
`Invalid key value format. Could not extract key name from: #HOST='localhost' USER='root' PASSWORD='nnnnn' CHARSETS='UTF8,LATIN1,WIN1250,WIN1251,WIN1252,WIN1256,WIN1258,KOI8' MAX_DB='500' U_SYS_USERS='' U_DB_BASES='1' SUSPENDED='no' TIME='08:11:31' DATE='2024-08-26' PORT='3306'`  
`Error: Invalid object format: #HOST='localhost' USER='root' PASSWORD='nnnnnnn' CHARSETS='UTF8,LATIN1,WIN1250,WIN1251,WIN1252,WIN1256,WIN1258,KOI8' MAX_DB='500' U_SYS_USERS='' U_DB_BASES='1' SUSPENDED='no' TIME='08:11:31' DATE='2024-08-26' PORT='3306'`

I don’t use any DB installed from HestiacCP.  
All of my DBs are self-contained into docker containers. Nothing outside.

I remember that at some point, HestiaCP was struggling with databases since it referenced one existing one that was not present… That’s probably why it shows `U_DB_BASES='1'`

Probably need to cleanup something with a SQL command. But how 🙂

If I type mysql or mariadb, I get  
`Can't connect to local server through socket '/run/mysqld/mysqld.sock'`

---

<div class="post-metadata">

**Author:** ![Blats](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/blats/32/5038_2.png) [@Blats](https://forum.hestiacp.com/u/Blats)\
**Post date:** [August 12, 2026, 8:53am UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069/7 "2026-08-12T08:53:26Z")

</div>

Check the file:

`cat /usr/local/hestia/conf/mysql.conf`

show me the output

you will see something like this: #HOST=‘localhost’ USER=‘root’ PASSWORD=‘…’ …

make it: HOST=‘localhost’ USER=‘root’ PASSWORD=‘…’ … as @sahsanu mention need to uncomment it, remove the #

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [August 12, 2026, 8:53am UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069/8 "2026-08-12T08:53:27Z")

</div>

> [@sjordi](#):
>
> Probably need to cleanup something. But how 🙂

You commented out the lines in conf file `/usr/local/hestia/conf/mysql.conf`, remove the `#` in front of the `HOST` keys in that file.

---

<div class="post-metadata">

**Author:** ![sjordi](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sjordi/32/7128_2.png) [@sjordi](https://forum.hestiacp.com/u/sjordi)\
**Post date:** [August 12, 2026, 9:09am UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069/9 "2026-08-12T09:09:14Z")

</div>

Ok that did it.  
Funny thing is I had two lines and it looks like if I uncomment the first one it works.

If I comment the first one it doesn’t work.  
If I uncomment it and comment the 2nd one it doesn’t work either…  
If both are uncommented, it works.

Isn’t the second line setting HOST again overriding the first one?

But now I get error messages by email:  
Can’t connect to MySQL localhost:3306  
ERROR 2002 (HY000): Can’t connect to local server through socket ‘/run/mysqld/mysqld.sock’ (2)

I’ll tinker with the password in the my.cnf, etc… until it works.

---

<div class="post-metadata">

**Author:** ![Blats](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/blats/32/5038_2.png) [@Blats](https://forum.hestiacp.com/u/Blats)\
**Post date:** [August 12, 2026, 9:11am UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069/10 "2026-08-12T09:11:51Z")

</div>

You can use v-delete-database-host mysql localhost and delete the db since you are working with docker.

---

<div class="post-metadata">

**Author:** ![sjordi](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sjordi/32/7128_2.png) [@sjordi](https://forum.hestiacp.com/u/sjordi)\
**Post date:** [August 12, 2026, 9:25am UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069/11 "2026-08-12T09:25:17Z")

</div>

> [@Blats](#):
>
> v-delete-database-host mysql localhost

I will.  
This command doesn’t work as it doesn’t know which HOST to suppress.  
I tried with only one line at a time and the correct matching password in /root/mysql.conf

I will check all references to all mysql conf files and clean up or correct the credentials by hand.

---

<div class="post-metadata">

**Author:** ![sjordi](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sjordi/32/7128_2.png) [@sjordi](https://forum.hestiacp.com/u/sjordi)\
**Post date:** [August 12, 2026, 10:01am UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069/12 "2026-08-12T10:01:14Z")

</div>

That’s weird  
If I uncomment both HOST=… in the `/usr/local/hestia/conf/`mysql.conf file, the configure button works.  
The order of the `HOST=` doesn’t matter.

If I set either password in /`root/.my.cnf` then HestiaCP works but I keep getting a hestiacp mail with the error:  
`Can't connect to MySQL localhost:3306`  
`ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)`

Then I stopped and restarted mysqld on my server but it fails no matter what with those errors:  
`provider_bzip2=force_plus_permanent'`  
`provider_lz4=force_plus_permanent'`  
`provider_lzma=force_plus_permanent'`  
`provider_lzo=force_plus_permanent'`  
`provider_snappy=force_plus_permanent'`

If I comment just one of the lines in `/usr/local/hestia/conf/mysql.conf` then I don’t get the errors anymore but I can’t reach the configure section with the error 500, no matter what password matches in `/usr/local/hestia/conf/mysql.conf`

And `/run/mysql` doesn’t ever see any kind of socket file there, even though owner and chmod rights are fine.

---

<div class="post-metadata">

**Author:** ![sahsanu](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sahsanu/32/9318_2.png) [@sahsanu](https://forum.hestiacp.com/u/sahsanu)\
**Post date:** [August 12, 2026, 10:05am UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069/13 "2026-08-12T10:05:36Z")

</div>

> [@sjordi](#):
>
> it fails no matter what with those errors:

```auto
apt install mariadb-plugin-provider-bzip2 mariadb-plugin-provider-lz4 mariadb-plugin-provider-lzma mariadb-plugin-provider-lzo mariadb-plugin-provider-snappy

```

And whether mariadb starts:

```t
systemctl restart mariadb
systemctl status mariadb --no-pager -l

```

---

<div class="post-metadata">

**Author:** ![sjordi](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/sjordi/32/7128_2.png) [@sjordi](https://forum.hestiacp.com/u/sjordi)\
**Post date:** [August 12, 2026, 10:16am UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069/14 "2026-08-12T10:16:11Z")

</div>

Ok mariadb did start this time.

And apparently, no more error message.  
Once again, you made my day 🙂

---

<div class="post-metadata">

**Author:** ![system](https://forum.hestiacp.com/uploads/default/original/1X/d9a5b68bf50ced83e880b56452e592b204761b19.png) [@system](https://forum.hestiacp.com/u/system)\
**Post date:** [September 11, 2026, 10:16am UTC](https://forum.hestiacp.com/t/hestiacp-configure-internal-server-error-500/22069/15 "2026-09-11T10:16:32Z")

</div>

Closed on September 11, 2026, 10:16am UTC

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