Beni Grind ~HB9HNTBeni Grind ~HB9HNT wrote the following post Sat, 18 Jul 2026 12:52:54 +0200

IPv6 database connection to Postgres

I already asked in the Matrix chat but I'll try here, too. I tried to migrate my database to an IPv6 only host (It's a FreeBSD jail, to be precise). When I set $db_host in .htconfig.php to an ipv6 address, my instance becomes unavailable. I tried the formats [2001:db8::666] and 2001:db8::666. Both don't work.

From the regular cron job I get the following error in the php log:

[17-Jul-2026 20:30:01 Europe/Zurich] PHP Fatal error:  Uncaught TypeError: dba_driver::__construct(): Argument #1 ($server) must be of type string, null given, called in /usr/local/www/grindc
ore.ch/include/dba/dba_driver.php on line 68 and defined in /usr/local/www/grindcore.ch/include/dba/dba_driver.php:144
Stack trace:
#0 /usr/local/www/grindcore.ch/include/dba/dba_driver.php(68): dba_driver->__construct(NULL, 'pgsql', 5432, 'hubzilla', '**********...', 'hubzilla', 'UTF8', false)
#1 /usr/local/www/grindcore.ch/boot.php(698): DBA::dba_factory(NULL, 5432, 'hubzilla', 'V9WHpLSLNdcMqXD...', 'hubzilla', '1', 'UTF8', false)
#2 /usr/local/www/grindcore.ch/include/cli_startup.php(11): sys_boot()
#3 /usr/local/www/grindcore.ch/Zotlabs/Daemon/Master.php(46): cli_startup()
#4 /usr/local/www/grindcore.ch/Zotlabs/Daemon/Master.php(13): Zotlabs\Daemon\Master::Release(1, Array)
#5 {main}
  thrown in /usr/local/www/grindcore.ch/include/dba/dba_driver.php on line 144

What's interesting is that in boot.php the value NULL seems to be passed as database host to the dba_driver constructor. If I understand this correctly it means that somewhere in boot.php the value of $db_host from .htconfig.php seems to be set to NULL but I couldn't find any code that modifies the content of this variable before passing it on.

Am I misreading the error message here? Could anyone more familiar with the code give me a pointer what I'm missing and where to look?

Thanks

--beni