Package: adminer
Version: 6.3.1-1
Severity: normal

Dear Maintainer,

I am trying to use the elasticsearch plugin for adminer.
I enabled it by adding
> include_once ADMINER_DIR . "/plugins/drivers/elastic.php";
to /etc/adminer/conf.php, but then I get the following error:

> Fatal error:
> Declaration of Adminer\Db::attach(array $server, string $username, string 
> $password): string
> must be compatible with
> Adminer\SqlDb::attach(array $N, $V, $E)
> in /usr/share/adminer/drivers/elastic.php on line 127

This error appears because Adminer itself is compiled (most types removed),
but the plugin is not compiled.
Similar error report at [1] with the response:
> Compiled Adminer requires compiled drivers

Even though compile.php is shipped in Debian, I can't compile drivers
because that fails with:
> $ cd /usr/share/adminer
> $ php compile.php drivers
> PHP Warning:  include(/usr/share/adminer/conf/JsShrink/jsShrink.php):
> Failed to open stream: No such file or directory
> in /usr/share/adminer/compile.php on line 6

It would be nice if the Debian package would ship the compiled drivers,
or make compilation possible.

(Drivers are duplicated: The exact same file exists here at
- plugins/drivers/elastic.php
- drivers/elastic.php
)

[1] https://github.com/vrana/adminer/issues/1378

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: 13.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'stable'), (1, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 7.1.8+deb13-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages adminer depends on:
ii  libapache2-mod-php                          2:8.4+96
ii  libapache2-mod-php8.4 [libapache2-mod-php]  8.4.28-1~deb13u1
ii  php-mysql                                   2:8.4+96
ii  php-pgsql                                   2:8.4+96
ii  php-sqlite3                                 2:8.4+96
ii  php8.4-mysql [php-pdo-mysql]                8.4.28-1~deb13u1
ii  php8.4-pgsql [php-pgsql]                    8.4.28-1~deb13u1
ii  php8.4-sqlite3 [php-sqlite3]                8.4.28-1~deb13u1

Versions of packages adminer recommends:
ii  apache2 [httpd]               2.4.69-1~deb13u1
ii  libjs-jush                    2.1.3-1
ii  php-cli                       2:8.4+96
ii  php-pgsql                     2:8.4+96
ii  php-sqlite3                   2:8.4+96
ii  php8.4-cli [php-cli]          8.4.28-1~deb13u1
ii  php8.4-mysql [php-mysqli]     8.4.28-1~deb13u1
ii  php8.4-pgsql [php-pgsql]      8.4.28-1~deb13u1
ii  php8.4-sqlite3 [php-sqlite3]  8.4.28-1~deb13u1

Versions of packages adminer suggests:
ii  mariadb-server [virtual-mysql-server]  1:11.8.6-0+deb13u1

-- Configuration Files:
/etc/adminer/conf.php changed:
<?php
define('ADMINER_DIR', '/usr/share/adminer');
function adminer_object() {
    // autoloader
    foreach (glob(ADMINER_DIR . "/plugins/*.php") as $filename) {
        include_once $filename;
    }
    #include_once ADMINER_DIR . "/plugins/drivers/elastic.php";
    include_once ADMINER_DIR . "/drivers/elastic.php";
    $plugins = array(
        // specify enabled plugins here
        new AdminerVersionNoverify(), // disable phoning home
        //new AdminerElasticsearch(),
        //new AdminerLoginServers([
        //    'my' => ['server' => 'localhost', 'driver' => 'server'], // mysql
        //    'pg' => ['server' => 'localhost', 'driver' => 'pgsql'],
        //]),
    );
    /* It is possible to combine customization and plugins:
    class AdminerCustomization extends Adminer\Plugins {
    }
    return new AdminerCustomization($plugins);
    */
    return new Adminer\Plugins($plugins);
}
include ADMINER_DIR . "/adminer.php";
?>


-- no debconf information

Reply via email to