Bug#857791: postfixadmin & dbconfig-common: mysql/mysqli mismatch
Package: postfixadmin Version: 3.2.1-2 Followup-For: Bug #857791 This bug remains in the current buster release. As PHP 5.x and MySQL (not MySQLi) is fully depreciated there is no need for even the patch in question. Very simply, this should just have mysqli as the database engine and nothing more. 1. It may be doable with just dbconfig-common's scripts in this package 2. otherwise a simple sed 3. or including this at the bottom of the file: if ($dbtype=='mysql') $dbtype='mysqli'; -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 4.19.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8), LANGUAGE=en_CA:en (charmap=UTF-8) Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Versions of packages postfixadmin depends on: ii apache2 [httpd] 2.4.38-2 ii dbconfig-common 2.0.11 ii debconf 1.5.71 ii default-mysql-client1.0.5 ii php 2:7.3+69 ii php-fpm 2:7.3+69 ii php-imap2:7.3+69 ii php-mbstring2:7.3+69 ii php-mysql 2:7.3+69 ii php7.3 [php]7.3.3-1 ii php7.3-fpm [php-fpm]7.3.3-1 ii php7.3-imap [php-imap] 7.3.3-1 ii php7.3-mbstring [php-mbstring] 7.3.3-1 ii php7.3-mysql [php-mysqlnd] 7.3.3-1 ii wwwconfig-common0.3.0 Versions of packages postfixadmin recommends: ii dovecot-core1:2.3.4.1-3 ii mariadb-server 1:10.3.13-1 ii mariadb-server-10.3 [virtual-mysql-server] 1:10.3.13-1 ii php7.3-cli [php-cli]7.3.3-1 ii postfix-mysql 3.4.4-1 pn zendframework postfixadmin suggests no packages. -- Configuration Files: /etc/apache2/conf-available/postfixadmin.conf changed [not included] -- debconf information excluded
Bug#857791: postfixadmin & dbconfig-common: mysql/mysqli mismatch
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.0 +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