Trial connecting to ownCloud via https throws an exception

170 views
Skip to first unread message

free...@googlemail.com

unread,
Sep 22, 2015, 6:16:43 PM9/22/15
to SabreDAV Discussion

Hi,

I want to get acces to an ownCloud (via https) directory using Sabre/Dav. I already did all the development guide.
I installed the xampp. SSL is on port 443.
I tried the following code, which worked using google.de as baseUri.

<?php

use Sabre\DAV\Client;
include
'vendor/autoload.php';

$settings
= array(
   
'baseUri' => 'https://owncloud.xyz.de/remote.php/webdav/',
   
'userName' => 'userName',
   
'password' => 'password'
   
//'proxy' => ''
);

$client
= new Client($settings);
$response
= $client->request('GET');

?>

The follwong exception has been thrown:


Fatal error: Uncaught exception 'Sabre\HTTP\ClientException' with message 'SSL certificate problem: unable to get local issuer certificate' in C:\xampp\htdocs\dev\webver\ws\vendor\sabre\http\lib\Client.php:354 Stack trace: #0 C:\xampp\htdocs\dev\webver\ws\vendor\sabre\http\lib\Client.php(101): Sabre\HTTP\Client->doRequest(Object(Sabre\HTTP\Request)) #1 C:\xampp\htdocs\dev\webver\ws\vendor\sabre\dav\lib\DAV\Client.php(341): Sabre\HTTP\Client->send(Object(Sabre\HTTP\Request)) #2 C:\xampp\htdocs\dev\webver\ws\inovelRequest.php(19): Sabre\DAV\Client->request('GET') #3 {main} thrown in C:\xampp\htdocs\dev\webver\ws\vendor\sabre\http\lib\Client.php on line 354


Why does it not work using https?
Does anybody have an idea?

Thanks!

Ingo Ratsdorf

unread,
Sep 22, 2015, 6:42:41 PM9/22/15
to sabredav...@googlegroups.com
Hi.

Suggest you google for "SSL certificate problem: unable to get local issuer certificate" and you will get a lot of hits. This is not to do with SabreDAV but PHP/CURL cannot verify the certificate. Either you install the required certificates or you disable verification. Have a read through some of the google results and see what applies to you. Hard to tell without knowing all your setup.

Cheers,
Ingo
Reply all
Reply to author
Forward
0 new messages