Package: php7.0-mysql Version: 7.0.9-2 Severity: normal Hi,
I'm trying to enable the MySQL cleartext plugin by using mysql::options() to set the MYSQLI_READ_DEFAULT_FILE option but MySQL ignores completely the content of '/my.cnf'. I think that mysql::options() function does not set this option internally in PHP7 because the same code works using PHP5 or the mysql command line client with the --enable-cleartext-plugin option. Content of 'test.php': $conn = mysqli_init (); $conn->options (MYSQLI_READ_DEFAULT_FILE, '/my.cnf'); $conn->real_connect ($host, $user, $pass, $name, $port); Content of '/my.cnf': [client] enable-cleartext-plugin -- Package-specific info: ==== Additional PHP 7.0 information ==== ++++ PHP @PHP_VERSION SAPI (php7.0query -S): ++++ ++++ PHP 7.0 Extensions (php7.0query -M -v): ++++ ++++ Configuration files: ++++ **** /etc/php/7.0/mods-available/mysqlnd.ini **** extension=mysqlnd.so **** /etc/php/7.0/mods-available/mysqli.ini **** extension=mysqli.so **** /etc/php/7.0/mods-available/pdo_mysql.ini **** extension=pdo_mysql.so -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages php7.0-mysql depends on: ii libc6 2.23-4 ii php-common 1:44 ii php7.0-common 7.0.9-2 ii ucf 3.0036 php7.0-mysql recommends no packages. php7.0-mysql suggests no packages. Versions of packages php7.0-common depends on: ii libc6 2.23-4 ii libssl1.0.2 1.0.2h-1 ii php-common 1:44 ii ucf 3.0036 Versions of packages php7.0-cli depends on: ii libc6 2.23-4 ii libedit2 3.1-20150325-1+b1 ii libmagic1 1:5.28-4 ii libpcre3 2:8.39-1 ii libssl1.0.2 1.0.2h-1 ii libxml2 2.9.4+dfsg1-1+b1 ii mime-support 3.60 ii php7.0-common 7.0.9-2 ii php7.0-json 7.0.9-2 ii php7.0-opcache 7.0.9-2 ii php7.0-readline 7.0.9-2 ii tzdata 2016f-1 ii ucf 3.0036 ii zlib1g 1:1.2.8.dfsg-2+b1 Versions of packages php7.0-cli suggests: ii php-pear 1:1.10.1+submodules+notgz-8 Versions of packages libapache2-mod-php7.0 depends on: ii apache2-bin [apache2-api-20120211] 2.4.23-4 ii libc6 2.23-4 ii libmagic1 1:5.28-4 ii libpcre3 2:8.39-1 ii libssl1.0.2 1.0.2h-1 ii libxml2 2.9.4+dfsg1-1+b1 ii mime-support 3.60 ii php7.0-cli 7.0.9-2 ii php7.0-common 7.0.9-2 ii php7.0-json 7.0.9-2 ii php7.0-opcache 7.0.9-2 ii tzdata 2016f-1 ii ucf 3.0036 ii zlib1g 1:1.2.8.dfsg-2+b1 Versions of packages libapache2-mod-php7.0 recommends: ii apache2 2.4.23-4 Versions of packages libapache2-mod-php7.0 suggests: ii php-pear 1:1.10.1+submodules+notgz-8 Versions of packages php7.0-fpm depends on: ii init-system-helpers 1.42 ii libapparmor1 2.10.95-4 ii libc6 2.23-4 ii libmagic1 1:5.28-4 ii libpcre3 2:8.39-1 ii libssl1.0.2 1.0.2h-1 ii libsystemd0 230-7 ii libxml2 2.9.4+dfsg1-1+b1 ii mime-support 3.60 ii php7.0-cli 7.0.9-2 ii php7.0-common 7.0.9-2 ii php7.0-json 7.0.9-2 ii php7.0-opcache 7.0.9-2 ii tzdata 2016f-1 ii ucf 3.0036 ii zlib1g 1:1.2.8.dfsg-2+b1 Versions of packages php7.0-fpm suggests: ii php-pear 1:1.10.1+submodules+notgz-8 -- no debconf information