linuxserver / docker-dokuwiki

GNU General Public License v3.0
113 stars 24 forks source link

PDO (Nextcloud) Authentication not working due to missing dependencies. #17

Closed TheManchineel closed 4 years ago

TheManchineel commented 4 years ago

Using the pdo plugin (which comes installed on the wiki by default) fails when connecting to a PostgreSQL or MySQL/MariaDB database due to missing PHP dependencies; this causes the wiki to apparently become broken when enabling PDO authentication and the only way to regain access is to revert said configuration option using by manually editing the /app/dokuwiki/conf/local.php file. It can be fixed by running apk add php7-pdo php7-pdo_pgsql php7-mysql.


Expected Behavior

  1. An administrator enables the PDO plugin
  2. The admin goes into Wiki Configuration, configures a database for authpdo with credentials, a host, database names and query schemas
  3. After enabling authpdo mode in configuration and saving, everyone is logged out and the wiki becomes accessible using credentials present in the database

Current Behavior

  1. AuthPDO plugin enables fine
  2. I enter correct database options, enable authpdo and hit Save
  3. I am logged out, and on the login screen is the following error: PDO extension for PHP not found. [auth.php:29]

    Steps to Reproduce

  4. Enable AuthPDO from Extension Manager
  5. Set up a MySQL or PostgreSQL database
  6. As explained here, enter settings for the database in configuration
  7. Switch from authplain to authpdo
  8. Wiki is broken

Environment

OS: Unraid Plus 6.8.3
CPU architecture: x86_64
How docker service was installed:
Unraid Community Applications feature

Command used to create docker container (run/create/compose/screenshot)

image

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 01-envfile: executing... [cont-init.d] 01-envfile: exited 0. [cont-init.d] 10-adduser: executing... usermod: no changes


      _         ()
     | |  ___   _    __
     | | / __| | |  /  \ 
     | | \__ \ | | | () |
     |_| |___/ |_|  \__/

Brought to you by linuxserver.io

To support LSIO projects visit: https://www.linuxserver.io/donate/

GID/UID

User uid: 99 User gid: 100

[cont-init.d] 10-adduser: exited 0. [cont-init.d] 20-config: executing... [cont-init.d] 20-config: exited 0. [cont-init.d] 30-keygen: executing... using keys found in /config/keys [cont-init.d] 30-keygen: exited 0. [cont-init.d] 50-config: executing... rm: cannot remove '/app/dokuwiki/install.php': No such file or directory [cont-init.d] Setting permissions this may take some time [cont-init.d] 50-config: exited 0. [cont-init.d] 99-custom-files: executing... [custom-init] no custom files found exiting... [cont-init.d] 99-custom-files: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done.

github-actions[bot] commented 4 years ago

Thanks for opening your first issue here! Be sure to follow the issue template!