AgenDAV & PHP 5.5/5.6

214 views
Skip to first unread message

Thomas Ukad

unread,
Dec 21, 2015, 9:02:12 AM12/21/15
to AgenDAV general

Hello,

AgenDAV is still running in Version 1.6 & .2.0.Beta without any problems on my Windows-Server (Apache 2.4 with PHP 5.4), against the SabreDAV-Framework in Version v1.8.3, v2.1 and v3.0.5.

Thunderbird/Lightning & CalDAV-Sync (from Marten) are working without any problems with PHP 5.4, PHP 5.5 & PHP 5.6 with the same SabreDAV-Framework, but both AgenDAV-Releases not (Error: invalid username or password):

The current logfile from the CalDAV server:

213.73.x.x - - [21/Dec/2015:14:31:28 +0100] "OPTIONS / HTTP/1.1" 401 356
213.73.x.x - - [21/Dec/2015:14:31:28 +0100] "OPTIONS / HTTP/1.1" 401 283


Any ideas? ;-)



Jorge López Pérez

unread,
Dec 21, 2015, 2:02:22 PM12/21/15
to agendav...@googlegroups.com
Hi Thomas,

On Mon, Dec 21, 2015, at 15:02, Thomas Ukad wrote:

> but both AgenDAV-Releases not (Error: invalid username or password):
>
> The current logfile from the CalDAV server:
>
> 213.73.x.x - - [21/Dec/2015:14:31:28 +0100] "OPTIONS / HTTP/1.1" 401 356
> 213.73.x.x - - [21/Dec/2015:14:31:28 +0100] "OPTIONS / HTTP/1.1" 401 283

SabreDAV uses digest authentication by default, did you configure
AgenDAV to use it?

On AgenDAV 1.2.6.2:
http://agendav.readthedocs.org/en/1.2.6.2/admin/configuration/#confval-caldav_http_auth_method
On AgenDAV 2.0.0-beta*:
http://docs.agendav.org/en/2.0.0-beta1/admin/configuration/#confval-caldav.authmethod

In case this doesn't work, in AgenDAV 2.0* you can enable the
development mode
(http://docs.agendav.org/en/2.0.0-beta1/admin/troubleshooting/) to get
an HTTP debug log.

Best regards.

--
Jorge López Pérez
http://adobo.org

Thomas Ukad

unread,
Dec 21, 2015, 2:36:07 PM12/21/15
to AgenDAV general
Hi Jorge,


Am Montag, 21. Dezember 2015 20:02:22 UTC+1 schrieb Jorge Lopez:
 
SabreDAV uses digest authentication by default, did you configure
AgenDAV to use it?

Yes, in both versions (1.6x / 2.0.0.Beta) -> and it's works with PHP 5.4.x
 
In case this doesn't work, in AgenDAV 2.0* you can enable the
development mode

It's enabled:

OPTIONS / HTTP/1.1
Host: caldav.g?h?l.net
User-Agent: AgenDAV/2.0.0-beta1


<<<<<<<<
HTTP/1.1 200 OK
Date: Sun, 13 Dec 2015 11:41:07 GMT
Server: Apache/2.4.17 (Win32) PHP/5.4.38 OpenSSL/1.0.2d
X-Powered-By: PHP/5.4.38
Allow: OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT
DAV: 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, calendar-access, calendar-proxy
MS-Author-Via: DAV
Accept-Ranges: bytes
X-Sabre-Version: 1.8.3
Content-Length: 0
Content-Type: text/html; charset=ISO-8859-1
Content-Language: de

-----------------------------


OPTIONS / HTTP/1.1
Host: caldav.g?h?l.net
User-Agent: AgenDAV/2.0.0-beta1


<<<<<<<<
HTTP/1.1 401 Unauthorized
Date: Mon, 21 Dec 2015 13:31:28 GMT
Server: Apache/2.4.17 (Win32) PHP/5.5.30 OpenSSL/1.0.2d
X-Powered-By: PHP/5.5.30
WWW-Authenticate: Digest realm="SabreDAV",qop="auth",nonce="56????30dec3c",opaque="df????ff8cf60599c939187d0b5c54de"
Content-Length: 283
Content-Type: application/xml; charset=utf-8
Content-Language: de

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:sabredav-version>3.0.5</s:sabredav-version>
  <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
  <s:message>Username or password was incorrect</s:message>
</d:error>



It is possible to set AUTH_DIGEST hardcoded in AgenDAV?

Best wishes,

Thomas





 

Jorge López Pérez

unread,
Dec 22, 2015, 4:56:29 AM12/22/15
to agendav...@googlegroups.com
Hi Thomas,

On Mon, Dec 21, 2015, at 20:36, Thomas Ukad wrote:

> It is possible to set AUTH_DIGEST hardcoded in AgenDAV?

Sure! Just follow the links from my previous message:
On AgenDAV 2.0.0-beta1 and develop branch:
http://docs.agendav.org/en/2.0.0-beta1/admin/configuration/#confval-caldav.authmethod

Thomas Ukad

unread,
Dec 22, 2015, 8:02:55 AM12/22/15
to AgenDAV general
Hi Jorge,

that's not a configuration problem, but a problem with PHP 5.5/5.6 and the Guzzle framework, I think.



PHP 5.5

213.73.x.x - - [21/Dec/2015:22:44:49 +0100] "OPTIONS / HTTP/1.1" 401 356
213.73.x.x - - [21/Dec/2015:22:44:49 +0100] "OPTIONS / HTTP/1.1" 401 283


[2015-12-21 22:44:49] {"request":"[object] (GuzzleHttp\\Message\\Request: OPTIONS / HTTP/1.1\r\nHost: caldav.g?h?l.de\r\n
User-Agent: AgenDAV/2.0.0-beta1\r\n\r\n)","response":"[object] (GuzzleHttp\\Message\\
Response: HTTP/1.1 401 Unauthorized\r\nDate: Mon, 21 Dec 2015 21:44:49 GMT\r\n
Server: Apache/2.4.17 (Win32) PHP/5.5.30 OpenSSL/1.0.2d\r\nX-Powered-By: PHP/5.5.30\r\n
WWW-Authenticate: Digest realm=\"SabreDAV\",qop=\"auth\",nonce=\"567????149403\",opaque=\"df????ff8cf60599c939187d0b5c54de\"\r\n
Content-Length: 283\r\nContent-Type: application/xml; charset=utf-8\r\n
Content-Language: de\r\n\r\n
<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<d:error xmlns:d=\"DAV:\" xmlns:s=\"http://sabredav.org/ns\">\n
 <s:sabredav-version>3.0.5</s:sabredav-version>\n  <s:exception>Sabre\\DAV\\Exception\\NotAuthenticated</s:exception>\n
 <s:message>Username or password was incorrect</s:message>\n</d:error>\n)","exception":"[object]
 GuzzleHttp\\Exception\\ClientException(code: 401): Client error response [url] http://caldav.g?h?l.de/ [status code] 401 [reason phrase]
 Unauthorized at X:\\CalDAV\\AgenDAV2\\web\\vendor\\guzzlehttp\\guzzle\\src\\Exception\\RequestException.php:89)"}
 {"url":"/calendar/login","ip":"213.73.x.x","http_method":"POST","server":"www.g?h?l.net","referrer":"https://www.g?h?l.net/calendar/login"} >>>>>>>>


OPTIONS / HTTP/1.1
Host: caldav.g?h?l.de

User-Agent: AgenDAV/2.0.0-beta1


<<<<<<<<
HTTP/1.1 401 Unauthorized
Date: Mon, 21 Dec 2015 21:44:49 GMT

Server: Apache/2.4.17 (Win32) PHP/5.5.30 OpenSSL/1.0.2d
X-Powered-By: PHP/5.5.30
WWW-Authenticate: Digest realm="SabreDAV",qop="auth",nonce="56????d149403",opaque="df????ff8cf60599c939187d0b5c54de"

Content-Length: 283
Content-Type: application/xml; charset=utf-8
Content-Language: de

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:sabredav-version>3.0.5</s:sabredav-version>
  <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
  <s:message>Username or password was incorrect</s:message>
</d:error>

--------
Client error response [url] http://caldav.g?h?l.de/ [status code] 401 [reason phrase] Unauthorized


===================================================================================

PHP 5.4

213.73.x.x - - [22/Dec/2015:13:55:19 +0100] "OPTIONS / HTTP/1.1" 401 356
213.73.x.x - - [22/Dec/2015:13:55:19 +0100] "OPTIONS / HTTP/1.1" 200 -

[2015-12-22 13:55:19] {"request":"[object] (GuzzleHttp\\Message\\Request: OPTIONS / HTTP/1.1\r\nHost: caldav.g?h?l.de\r\n
User-Agent: AgenDAV/2.0.0-beta1\r\n\r\n)","response":"[object] (GuzzleHttp\\Message\\
Response: HTTP/1.1 200 OK\r\nDate: Tue, 22 Dec 2015 12:55:19 GMT\r\n
Server: Apache/2.4.17 (Win32) PHP/5.4.38 OpenSSL/1.0.2d\r\n
X-Powered-By: PHP/5.4.38\r\nX-Sabre-Version: 3.0.5\r\n
Allow: OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT\r\n
DAV: 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, calendar-access, calendar-proxy, calendarserver-subscribed, calendar-auto-schedule\r\n
MS-Author-Via: DAV\r\n
Accept-Ranges: bytes\r\nContent-Length: 0\r\nContent-Type: text/html; charset=ISO-8859-1\r\n
Content-Language: de\r\n\r\n)"} {"url":"/calendar/login","ip":"213.73.x.x","http_method":"POST","server":"www.g?h?l.net",
"referrer":"https://www.g?h?l.net/calendar/login"} >>>>>>>>

OPTIONS / HTTP/1.1
Host: caldav.g?h?l.de

User-Agent: AgenDAV/2.0.0-beta1


<<<<<<<<
HTTP/1.1 200 OK
Date: Tue, 22 Dec 2015 12:55:19 GMT

Server: Apache/2.4.17 (Win32) PHP/5.4.38 OpenSSL/1.0.2d
X-Powered-By: PHP/5.4.38
X-Sabre-Version: 3.0.5

Allow: OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT
DAV: 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, calendar-access, calendar-proxy, calendarserver-subscribed, calendar-auto-schedule
MS-Author-Via: DAV
Accept-Ranges: bytes

Content-Length: 0
Content-Type: text/html; charset=ISO-8859-1
Content-Language: de



Best wishes,

Thlomas

Thomas Ukad

unread,
Dec 23, 2015, 4:41:17 PM12/23/15
to AgenDAV general

Hello Jorge,

I found and fixed the problem for myself.


On Windows specifically, this seems to be a known bug with digest authentication in all newer PHP versions with cURL-Lib greather than 7.39.0. I found the last stable PHP_CURL.DLL in the PHP v5.6.4-archiv
on php.net, copied the older PHP_CURL.DLL into my current PHP v5.6.16 installation and it works with both AgenDAV versions.


Merry christmas,

Thomas



Jorge López Pérez

unread,
Dec 28, 2015, 4:27:54 AM12/28/15
to agendav...@googlegroups.com
Hi Thomas,

On Wed, Dec 23, 2015, at 22:41, Thomas Ukad wrote:

> On Windows specifically, this seems to be a known bug with digest
> authentication in all newer PHP versions with cURL-Lib greather than
> 7.39.0. I found the last stable PHP_CURL.DLL in the PHP v5.6.4-archiv
> on php.net, copied the older PHP_CURL.DLL into my current PHP v5.6.16
> installation and it works with both AgenDAV versions.

Wow. Do you happen to have a URL describing the issue?

> Merry christmas,

I'm a little late, so Happy New Year to you :-)

Thomas Ukad

unread,
Dec 28, 2015, 12:24:01 PM12/28/15
to AgenDAV general
Hi Jorge,


> Wow. Do you happen to have a URL describing the issue?

I think, bug #70101 is the right one. I could verify the bug in all last Win32-Releases of PHP 5.4/5.5 & 5.6.  PHP 7.0 isn't affected, but SabreDAV 3.0.5 doesn't support PHP 7.0  -> internal SabreDAV server error with AgenDAV 2.0.0 <g>.

Tested with PHP 5.6.16 and  php_curl.dll versions of older PHP-Builds:

php_curl.dll  <= v5.6.4     - no problems
php_curl.dll  v5.6.5/v5.6.6 - crash with AgenDAV & Auth_Digest
php_curl.dll  => v5.6.7     - Auth_Digest failed
:



Jorge López Pérez

unread,
Dec 29, 2015, 4:39:26 AM12/29/15
to agendav...@googlegroups.com
Hi Thomas,

On Mon, Dec 28, 2015, at 18:24, Thomas Ukad wrote:

> I think, bug #70101 is the right one. I could verify the bug in all last
> Win32-Releases of PHP 5.4/5.5 & 5.6.

Thank you, I will add a note about this bug on the documentation.

> PHP 7.0 isn't affected, but
> SabreDAV
> 3.0.5 doesn't support PHP 7.0 -> internal SabreDAV server error with
> AgenDAV 2.0.0 <g>.

Tests look all right for latest SabreDAV and PHP 7 at
https://travis-ci.org/fruux/sabre-dav . Perhaps you could post your
problem to the SabreDAV mailing list.

Thomas Ukad

unread,
Jan 2, 2016, 6:27:41 AM1/2/16
to AgenDAV general

Hello Jorge,

 
Tests look all right for latest SabreDAV and PHP 7 at
https://travis-ci.org/fruux/sabre-dav . Perhaps you could post your
problem to the SabreDAV mailing list.

The current SabreDAV-Alpha (v3.1.0.a2) is still working with PHP 7.0.


Happy new year,

Thomas



Thomas Ukad

unread,
Jun 27, 2017, 1:30:36 PM6/27/17
to AgenDAV general


> The current SabreDAV-Alpha (v3.1.0.a2) is still working with PHP 7.0.

 
Important Update:

The "php_curl.dll" Bug from PHP 5.6 (Number #70101) is now ported to PHP 7.0.20 ... :-(((((((

The "php_curl.dll" from PHP 7.0.14 is still working with AgenDAV 2.20 & SabreDAV 3.22 under PHP 7.0.20 ...

Message has been deleted

Thomas Ukad

unread,
Dec 11, 2017, 11:27:35 AM12/11/17
to AgenDAV general

Hello Jorgem

> I think, bug #70101 is the right one. I could verify the bug in all last
> Win32-Releases of PHP 5.4/5.5 & 5.6.

Tests look all right for latest SabreDAV and PHP 7 at
https://travis-ci.org/fruux/sabre-dav . Perhaps you could post your
problem to the SabreDAV mailing list.


I took another look at the problem and found a solution:

Could you update the GuzzleHttp framework in your AgenDAV zipfile to the current version 6.3? This GuzzleHttp version seems to contain a fix for the current PHP Curl versions, which fixes the problems with Auth-Digest.


Merry christmas ... 8-)

Best wishes, Thomas
Reply all
Reply to author
Forward
0 new messages