Package: postfixadmin
Version: 3.0.2-1
Severity: important
Dear Maintainer,
after installing Postfixadmin and configuring it with dbconfig-common, I
got the following error in my browser:
> DEBUG INFORMATION:
> MySQL 3.x / 4.0 functions not available! (php5-mysql installed?)
> database_type = 'mysql' in config.inc.php, are you using a different
> database?
It looks like "mysql" for $dbtype in /etc/postfixadmin/dbconfig.inc.php
is no longer supported at PHP 7.x. If changed to "mysqli" it works like
a charm.
I've written a small patch as workaround. Maybe there is a better
solution, I don't know. I'm not an expert for dbconfig-common :-)
> --- config.inc.php.bkp 2017-02-10 15:08:46.000000000 +0100
> +++ config.inc.php 2017-03-15 02:08:20.198334667 +0100
> @@ -23,6 +23,11 @@ if (!isset($dbserver) || empty($dbserver
> $dbserver='localhost';
> }
>
> +if(isset($dbtype) && $dbtype == 'mysql' /*&&
version_compare(PHP_VERSION, '7.0.0') >= 0*/)
> +{
> + $dbtype = 'mysqli';
> +}
> +
> /*****************************************************************
> * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> * You have to set $CONF['configured'] = true; before the
This should be fixed for Stretch ASAP. Thanks.
--
With kind regards,
Christian Schrötter