Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHP 7.0] Web interface. Ajax Authentication Error #2282

Closed
posledov opened this issue Nov 23, 2016 · 2 comments
Closed

[PHP 7.0] Web interface. Ajax Authentication Error #2282

posledov opened this issue Nov 23, 2016 · 2 comments

Comments

@posledov
Copy link

Steps to reproduce

  1. install php70
  2. enable nginx to use it for NC
  3. try to login (internal or ldap user -- it's no matter)

Expected behaviour

successful login

Actual behaviour

frequent logo off

Server configuration

Operating system: centos 7.2

Web server: nginx 1.10.2

Database: precona mysql 5.7

PHP version: php70 @remi

Nextcloud version: 10.0.1 (stable)

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - activity: 2.3.2
  - admin_audit: 1.0.0
  - calendar: 1.4.0
  - comments: 1.0.0
  - contacts: 1.4.0.0
  - dav: 1.0.1
  - federatedfilesharing: 1.0.1
  - files: 1.5.2
  - files_external: 1.0.2
  - files_pdfviewer: 0.8.1
  - files_sharing: 1.0.0
  - files_texteditor: 2.1
  - files_trashbin: 1.0.0
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - gallery: 15.0.0
  - notifications: 0.3.0
  - password_policy: 1.0.0
  - survey_client: 0.1.5
  - systemtags: 1.0.2
  - tasks: 0.9.3
  - templateeditor: 0.1
  - theming: 1.0.1
  - twofactor_totp: 0.4.1
  - updatenotification: 1.0.1
  - user_ldap: 1.0.1
  - workflowengine: 1.0.1
Disabled:
  - encryption
  - external
  - federation
  - files_accesscontrol
  - files_automatedtagging
  - files_retention
  - firstrunwizard
  - provisioning_api
  - serverinfo
  - user_external
  - user_saml

The content of config/config.php:

Config report
{
    "system": {
        "appstore.experimental.enabled": false,
        "datadirectory": "\/mnt\/nextcloud",
        "dbhost": "db.home.lan",
        "dbname": "nextcloud",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbtype": "mysql",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "ocy54083f6gn",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "loglevel": 3,
        "logtimezone": "Europe\/Kiev",
        "mail_domain": "example.net",
        "mail_from_address": "nextcloud",
        "mail_smtpauth": 1,
        "mail_smtpauthtype": "PLAIN",
        "mail_smtphost": "example.net",
        "mail_smtpmode": "smtp",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpsecure": "ssl",
        "maintenance": false,
        "memcache.local": "\\OC\\Memcache\\Redis",
        "overwrite.cli.url": "https:\/\/nextcloud.example.net",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "redis": {
            "host": "redis.home.lan",
            "port": 6379,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***",
            "dbindex": 0
        },
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trashbin_retention_obligation": "30, 45",
        "trusted_domains": [
            "nextcloud.example.net"
        ],
        "updater.release.channel": "stable",
        "updater.server.url": "https:\/\/updates.nextcloud.org\/updater_server\/",
        "version": "9.1.1.5"
    }
}

Are you using external storage, if yes which one: no

Are you using encryption: no

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

LDAP configuration (delete this part if not used)

LDAP config
+-------------------------------+--------------------------------------------------------------------------------------+
| Configuration                 | s01                                                                                  |
+-------------------------------+--------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 0                                                                                    |
| hasPagedResultSupport         |                                                                                      |
| homeFolderNamingRule          | attr:entryDN                                                                         |
| lastJpegPhotoLookup           | 0                                                                                    |
| ldapAgentName                 | cn=nextcloud,ou=services,dc=home                                                     |
| ldapAgentPassword             | ***                                                                                  |
| ldapAttributesForGroupSearch  |                                                                                      |
| ldapAttributesForUserSearch   |                                                                                      |
| ldapBackupHost                |                                                                                      |
| ldapBackupPort                |                                                                                      |
| ldapBase                      | ou=accounts,dc=home                                                                  |
| ldapBaseGroups                | ou=accounts,dc=home                                                                  |
| ldapBaseUsers                 | ou=accounts,dc=home                                                                  |
| ldapCacheTTL                  | 600                                                                                  |
| ldapConfigurationActive       | 1                                                                                    |
| ldapDynamicGroupMemberURL     |                                                                                      |
| ldapEmailAttribute            | mail                                                                                 |
| ldapExperiencedAdmin          | 1                                                                                    |
| ldapExpertUUIDGroupAttr       |                                                                                      |
| ldapExpertUUIDUserAttr        |                                                                                      |
| ldapExpertUsernameAttr        |                                                                                      |
| ldapGroupDisplayName          | cn                                                                                   |
| ldapGroupFilter               |                                                                                      |
| ldapGroupFilterGroups         |                                                                                      |
| ldapGroupFilterMode           | 0                                                                                    |
| ldapGroupFilterObjectclass    |                                                                                      |
| ldapGroupMemberAssocAttr      | member                                                                               |
| ldapHost                      | ldap://ldap.home.lan                                                                 |
| ldapIgnoreNamingRules         |                                                                                      |
| ldapLoginFilter               | (&(objectclass=inetOrgPerson)(memberof=cn=nextcloud,ou=services,dc=home)(uid=%uid))  |
| ldapLoginFilterAttributes     |                                                                                      |
| ldapLoginFilterEmail          | 0                                                                                    |
| ldapLoginFilterMode           | 0                                                                                    |
| ldapLoginFilterUsername       | 1                                                                                    |
| ldapNestedGroups              | 0                                                                                    |
| ldapOverrideMainServer        |                                                                                      |
| ldapPagingSize                | 500                                                                                  |
| ldapPort                      | 389                                                                                  |
| ldapQuotaAttribute            |                                                                                      |
| ldapQuotaDefault              |                                                                                      |
| ldapTLS                       | 0                                                                                    |
| ldapUserDisplayName           | cn                                                                                   |
| ldapUserDisplayName2          |                                                                                      |
| ldapUserFilter                | (&(objectclass=inetOrgPerson)(memberof=cn=nextcloud,ou=services,dc=home))            |
| ldapUserFilterGroups          |                                                                                      |
| ldapUserFilterMode            | 0                                                                                    |
| ldapUserFilterObjectclass     |                                                                                      |
| ldapUuidGroupAttribute        | auto                                                                                 |
| ldapUuidUserAttribute         | auto                                                                                 |
| turnOffCertCheck              | 1                                                                                    |
| useMemberOfToDetectMembership | 1                                                                                    |
+-------------------------------+--------------------------------------------------------------------------------------+```
</details>

### Client configuration
**Browser:** any

**Operating system:** any

### Logs
#### Nextcloud log (data/nextcloud.log)
<details>
<summary>Nextcloud log</summary>

{"reqId":"nCMcJRoa0PkPiGmaHDRa","remoteAddr":"192.168.254.253","app":"webdav","message":"Exception: {"Message":"HTTP\/1.1 401 Cannot authenticate over ajax calls","Exception":"Sabre\\DAV\\Exception\\NotAuthenticated","Code":0,"Trace":"#0 \/var\/www\/nextcloud.example.net\/apps\/dav\/lib\/Connector\/Sabre\/Auth.php(155): OCA\\DAV\\Connector\\Sabre\\Auth->auth(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#1 \/var\/www\/nextcloud.example.net\/3rdparty\/sabre\/dav\/lib\/DAV\/Auth\/Plugin.php(163): OCA\\DAV\\Connector\\Sabre\\Auth->check(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#2 [internal function]: Sabre\\DAV\\Auth\\Plugin->beforeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#3 \/var\/www\/nextcloud.example.net\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#4 \/var\/www\/nextcloud.example.net\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(446): Sabre\\Event\\EventEmitter->emit('beforeMethod', Array)\n#5 \/var\/www\/nextcloud.example.net\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#6 \/var\/www\/nextcloud.example.net\/apps\/dav\/appinfo\/v1\/webdav.php(60): Sabre\\DAV\\Server->exec()\n#7 \/var\/www\/nextcloud.example.net\/remote.php(165): require_once('\/var\/www\/nextcloud.ex...')\n#8 {main}","File":"\/var\/www\/nextcloud.example.net\/apps\/dav\/lib\/Connector\/Sabre\/Auth.php","Line":248,"User":false}","level":0,"time":"2016-11-17T23:46:03+02:00","method":"PROPFIND","url":"/remote.php/webdav/","user":"--"}

</details>
@posledov posledov changed the title Ajax Authentication Error [PHP 7.0] Web interface. Ajax Authentication Error Nov 24, 2016
@MorrisJobke
Copy link
Member

We have many users using Nginx and PHP 7.0 and never seen such a problem. Maybe double check the configs from https://docs.nextcloud.com/server/10/admin_manual/installation/nginx_nextcloud_9x.html

As this looks like a setup issue I would guide you to the forums to search for help there: https://help.nextcloud.com

Thanks

@posledov
Copy link
Author

posledov commented Dec 5, 2016

My configuration almost the same as the configuration from the documentation
vimdiff

P.S.: https://help.nextcloud.com/t/frequent-log-offs-ajax-authentication-error/3845/4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants