postfixadmin / docker

Docker Image for PostfixAdmin
https://hub.docker.com/_/postfixadmin
GNU General Public License v2.0
72 stars 21 forks source link

MySQL 4.1 functions not available! (php5-mysqli installed?) #36

Closed jlegido closed 3 years ago

jlegido commented 3 years ago

Hi there.

First of all many thanks to all the people involved in this project for their time, I really appreciate it.

I was facing below error:

DEBUG INFORMATION:
MySQL 4.1 functions not available! (php5-mysqli installed?)
database_type = 'mysqli' in config.inc.php, are you using a different database?

Please check the documentation and website for more information.

Postfix Admin
Forums

The root cause is that the docker image is missing the https://www.php.net/manual/en/book.mysqli.php PHP extension.

To fix it:

docker exec -ti mailadmin bash
docker-php-ext-install mysqli
exit
docker restart mailadmin; docker logs -f mailadmin

Pasting here the environment variables of the docker container, which I guess are the relevant ones:

            "Env": [
                "POSTFIXADMIN_DB_HOST=mailadmin-db",
                "POSTFIXADMIN_DB_NAME=mailadmin",
                "POSTFIXADMIN_DB_PASSWORD=secret",
                "POSTFIXADMIN_DB_TYPE=mysqli",
                "POSTFIXADMIN_DB_USER=mailadmin",
                "POSTFIXADMIN_SETUP_PASSWORD=secret",
                "POSTFIXADMIN_SMTP_PORT=587",
                "POSTFIXADMIN_SMTP_SERVER=mail",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "PHPIZE_DEPS=autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c",
                "PHP_INI_DIR=/usr/local/etc/php",
                "APACHE_CONFDIR=/etc/apache2",
                "APACHE_ENVVARS=/etc/apache2/envvars",
                "PHP_EXTRA_BUILD_DEPS=apache2-dev",
                "PHP_EXTRA_CONFIGURE_ARGS=--with-apxs2 --disable-cgi",
                "PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
                "PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
                "PHP_LDFLAGS=-Wl,-O1 -pie",
                "GPG_KEYS=42670A7FE4D0441C8E4632349E4FDC074A4EF02D 5A52880781F755608BF815FC910DEB46F53EA312",
                "PHP_VERSION=7.4.14",
                "PHP_URL=https://www.php.net/distributions/php-7.4.14.tar.xz",
                "PHP_ASC_URL=https://www.php.net/distributions/php-7.4.14.tar.xz.asc",
                "PHP_SHA256=f9f3c37969fcd9006c1dbb1dd76ab53f28c698a1646fa2dde8547c3f45e02886",
                "POSTFIXADMIN_VERSION=3.3.3",
                "POSTFIXADMIN_SHA512=363b91eb07f263a0f595e020725cacf9f9de058adaef3987efb3257d0e6fba526b075f8328e47763256278797ec946305d1e4c8ff5c55d77753f9ed72bfa4121",
                "APACHE_DOCUMENT_ROOT=/var/www/html/public"
            ],

Is somebody else facing same issue?

DavidGoodwin commented 3 years ago
                "POSTFIXADMIN_VERSION=3.3.3",

I don't see that error message being possible in 3.3.x. :-/

jlegido commented 3 years ago

@DavidGoodwin many thanks for your quick reply.

It was working at some point in the past, it's a server that I'm constantly redeploying.

I've just checked if there's a newer docker version, and looks like I'm running the last one:

docker pull postfixadmin

Output:

Using default tag: latest
latest: Pulling from library/postfixadmin
Digest: sha256:d854d756618d6184ec37a8f327d6791b1b5fb7a275befd16d9e8f472f7e22705
Status: Image is up to date for postfixadmin:latest
docker.io/library/postfixadmin:latest

Should I keep this open just in case that somebody faces same issue?

jlegido commented 3 years ago

After a fresh reinstallation no longer able to reproduce the issue.

BTW nice new interface.

Closing the issue