nextcloud / apps

🚚 This is an archive. Let us know if you want to take over maintainership of any of these apps
11 stars 29 forks source link

External User Support with IMAP not working #61

Closed tiagoefreitas closed 6 years ago

tiagoefreitas commented 6 years ago

Steps to reproduce

  1. Activate External Users App
  2. Configure IMAP Authentication: cat /var/www/nextcloud/config/imapauth.config.php :

<?php $CONFIG = array( "user_backends" => array ( 0 => array ( "class" => "OC_User_IMAP", "arguments" => array ( 0 => '{imap.server.com:993/imap/ssl/readonly}' ), ), ), ); ?>

  1. Try to login

Expected behaviour

Logs in

Actual behaviour

Nothing happens, this in log :

Error PHP Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/config/imapauth.config.php:13) at /var/www/nextcloud/lib/private/Session/CryptoWrapper.php#89 2018-08-08T19:00:04+0100 Error PHP Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/config/imapauth.config.php:13) at /var/www/nextcloud/lib/base.php#520 2018-08-08T19:00:03+0100 Error PHP Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/config/imapauth.config.php:13) at /var/www/nextcloud/lib/base.php#520 2018-08-08T19:00:03+0100 Error PHP Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/config/imapauth.config.php:13) at /var/www/nextcloud/lib/private/legacy/response.php#271 2018-08-08T19:00:03+0100

Server configuration detail

Operating system: Linux 4.15.0-30-generic #32-Ubuntu SMP Thu Jul 26 17:42:43 UTC 2018 x86_64

Webserver: Apache/2.4.34 (Ubuntu) (fpm-fcgi)

Database: pgsql PostgreSQL 10.4 (Ubuntu 10.4-0ubuntu0.18.04) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0, 64-bit

PHP version: 7.2.7-0ubuntu0.18.04.2 Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, cgi-fcgi, PDO, xml, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, imap, intl, json, ldap, exif, pdo_pgsql, pgsql, Phar, posix, readline, redis, shmop, SimpleXML, smbclient, soap, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, libsmbclient, Zend OPcache

Nextcloud version: 13.0.5 - 13.0.5.2

Updated from an older Nextcloud/ownCloud or fresh install: fresh

Where did you install Nextcloud from: official vm

Signing status Array
List of activated apps ``` Enabled: - activity: 2.6.1 - caniupdate: 0.1.3 - comments: 1.3.0 - dav: 1.4.7 - encryption: 2.0.0 - federatedfilesharing: 1.3.1 - federation: 1.3.0 - files: 1.8.0 - files_pdfviewer: 1.2.1 - files_sharing: 1.5.0 - files_texteditor: 2.5.1 - files_trashbin: 1.3.0 - files_versions: 1.6.0 - files_videoplayer: 1.2.0 - firstrunwizard: 2.2.1 - gallery: 18.0.0 - issuetemplate: 0.3.0 - logreader: 2.0.0 - lookup_server_connector: 1.1.0 - nextcloud_announcements: 1.2.0 - notifications: 2.1.2 - oauth2: 1.1.1 - onlyoffice: 1.3.0 - password_policy: 1.3.0 - provisioning_api: 1.3.0 - registration: 0.4.3 - serverinfo: 1.3.0 - sharebymail: 1.3.0 - spreed: 3.2.5 - survey_client: 1.1.0 - systemtags: 1.3.0 - theming: 1.4.5 - twofactor_backupcodes: 1.2.3 - twofactor_totp: 1.4.1 - updatenotification: 1.3.0 - user_external: 0.4 - user_ldap: 1.3.1 - workflowengine: 1.3.0 Disabled: - admin_audit - files_external - user_saml ```
Configuration (config/config.php) ``` { "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "localhost", "77.235.58.186", "XXX", "XXX" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "XXX", "dbtype": "pgsql", "version": "13.0.5.2", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "mail_smtpmode": "smtp", "log_rotate_size": "10485760", "memcache.local": "\\OC\\Memcache\\Redis", "filelocking.enabled": true, "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "timeout": 0.5, "dbindex": 0, "password": "***REMOVED SENSITIVE VALUE***" }, "htaccess.RewriteBase": "\/", "loglevel": "2", "log_type": "file", "logfile": "\/mnt\/ncdata\/nextcloud.log", "logtimezone": "Europe\/Lisbon", "maintenance": false, "mail_smtpauthtype": "LOGIN", "mail_smtpauth": 1, "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "ldapIgnoreNamingRules": false, "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory" } ```

Are you using external storage, if yes which one: local zfs

Are you using encryption: yes

Are you using an external user-backend, if yes which one: IMAP

Client configuration

Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Operating system:

Logs

Webserver log ``` Insert your webserver log here ```
Nextcloud log {"reqId":"bdX2KG28DwqRiBf6PrT0","level":3,"time":"2018-08-08T19:30:01+01:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Cannot modify header information - headers already sent by (output started at \/var\/www\/nextcloud\/config\/imapauth.config.php:13) at \/var\/www\/nextcloud\/lib\/private\/legacy\/response.php#271","userAgent":"--","version":"13.0.5.2"} {"reqId":"bdX2KG28DwqRiBf6PrT0","level":3,"time":"2018-08-08T19:30:01+01:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Cannot modify header information - headers already sent by (output started at \/var\/www\/nextcloud\/config\/imapauth.config.php:13) at \/var\/www\/nextcloud\/lib\/base.php#520","userAgent":"--","version":"13.0.5.2"} {"reqId":"bdX2KG28DwqRiBf6PrT0","level":3,"time":"2018-08-08T19:30:01+01:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Cannot modify header information - headers already sent by (output started at \/var\/www\/nextcloud\/config\/imapauth.config.php:13) at \/var\/www\/nextcloud\/lib\/base.php#520","userAgent":"--","version":"13.0.5.2"} {"reqId":"bdX2KG28DwqRiBf6PrT0","level":3,"time":"2018-08-08T19:30:02+01:00","remoteAddr":"","user":"--","app":"PHP","method":"--","url":"--","message":"Cannot modify header information - headers already sent by (output started at \/var\/www\/nextcloud\/config\/imapauth.config.php:13) at \/var\/www\/nextcloud\/lib\/private\/Session\/CryptoWrapper.php#89","userAgent":"--","version":"13.0.5.2"}
Browser log