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

Error PHP ldap_start_tls(): Unable to start TLS: Protocol error at...apps/user_ldap/lib/ldap.php#252 #12108

Closed
Aurelien- opened this issue Nov 11, 2014 · 9 comments

Comments

@Aurelien-
Copy link

Hello,

I have Owncloud server 7.0.2 connected to LDAP using ldap://127.0.0.1:389. All is working fine except a error in the log:

Error PHP ldap_start_tls(): Unable to start TLS: Protocol error at... apps/user_ldap/lib/ldap.php#252

My LDAP does not allow TLS connection and owncloud server is not set to use it. This error does not avoir to use owncloud or to login, for the moment it more like a warning for me. But I wonder what owncloud is trying to do.

My test user has also an external link to a dropbox and box.com account.

It seems that this error has been encountered at the end of the issue: #11746

Thanks for your help.

@Prev-I
Copy link

Prev-I commented Nov 12, 2014

I've got the same problem and I found the explanation on the php website:

http://php.net/manual/en/function.ldap-start-tls.php

To fix the certificate validity issue:
add:
TLS_REQCERT never
in file (create it if not exist)
c:\openldap\sysconf\ldap.conf <= Windows
/etc/ldap.conf <= linux
A restart of the web server may be required to apply changes

Probably a better solution could be found, but for now this worked for me :)

@PVince81
Copy link
Contributor

@blizzz @LukasReschke

@LukasReschke
Copy link
Member

No idea. - @blizzz Knows the LDAP code way better.

@blizzz
Copy link
Contributor

blizzz commented Nov 12, 2014

@Aurelien- likely a false positive detection :(

you can check on command line from within the owncloud root directory:

./occ ldap:show-config

Look for the entry ldapTLS. Is it set to 1? Set it to 0:

./occ ldap:set-config "" ldapTLS 0

(If next to Configuration something else is written, like s01, use that value instead of the "" – it's the case with more than one LDAP server configuration)

@Aurelien-
Copy link
Author

Thanks ! It seems to work :)

But, is owncloud auto-detecting ldap protocol without taking account of the given url in the parameter ?

Is it possible that this 'false positive detection' happen again after some time ?

@blizzz
Copy link
Contributor

blizzz commented Nov 14, 2014

It might, if you rerun port detection. We take the input and try several combinations, and prefer TLS over non-TLS.

@blizzz
Copy link
Contributor

blizzz commented Nov 14, 2014

@Aurelien- which LDAP server is used?

@karlitschek
Copy link
Contributor

@Aurelien- Can you give the requested information please?

@Aurelien-
Copy link
Author

Oh very sorry for the delay, my ldap server is 2.4.31-1+nmu2 on debian 7.7.

@blizzz blizzz closed this as completed Jun 16, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Aug 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants