Befox / cdav

Dolibarr module to access calendars and address book from CalDAV/CardDAV tools
GNU General Public License v3.0
47 stars 28 forks source link

carddav client settings (mac contacts) #35

Open punkyard opened 4 years ago

punkyard commented 4 years ago

to set up a carddav client, it takes: type of account : (advanced?) username: (superadmin user name, for instance) password: (password, ok) server: http(s?)://mywebsite.net/../cdav/server.php/addressbooks/SameUsernameAsAbove/default/ or https://mywebsite.net:8843/../cdav/server.php path: /addressbooks/tresorier/default/ ? Port: 443? 8843? SSL, no SSL? or .. or .. which makes more than a hundred possibilities to test :/ ..

so far: "impossible de vérifier le nom et le mot de passe du compte" the sabre interface is accessible in Safari but impossible to "log in" and have the user validated in Contacts ..

could someone share precisely one's functioning settings please XXL?

bitte schone punk, france

(contacts mac os x catalina)

jpfox commented 4 years ago

Have you read troubleshootings paragraph in Readme file? What is your server configuration? apache / nginx? php in apache module, php fast cgi, php fpm ? php version?

punkyard commented 4 years ago

hey thanks for the reply and suggestion i guess the ReadMe file holds the same content as https://github.com/Befox/cdav?

my host server : Version Apache | 2.4.41 Version de PHP | 7.2.24 i can't access the PHP settings, fast cgi ou fpm, I dont know

i'm about to set my choice on Dolibarr for a public organization cdav needs to work for every plateforme according to each user working with us i would like to give correct settings to each user .. but i can't have it to work for myself on Contacts mac nor iOs !! ^^ though, I have two other carddav accounts installed which work fine (with path as /principals/..) (and these two are deactivated as i'm trying to install cdav account)

i've noticed in the readme the comment about apache in .htaccess but these lines seem to be already in the .htaccess file of cdav SetEnvIf Authorization and <IfModule too

i have tried Cdav in htdocs and custom folders, same answer "Unable to verify account name or password."

cheers JP

punkyard commented 4 years ago

(on planethoster free plan for this dolibarr test)

jpfox commented 4 years ago

I think your hosting environment is not compatible with cdav module authentication. It occurs sometimes with this kind of hosting :-(

jpfox commented 4 years ago

It doesn't depend on client software, it is a server setup problem

punkyard commented 4 years ago

arff bugger!

then, do you think it would be possible for you to tell me the exact needs of a right server setup? cause i've tried with mamp and another online hosting, and it won't work either .. probably something i'm doing wrong ..

wishing u a happy new year and thanks a lot for your response 👍

jpfox commented 4 years ago

I do not know how Mac environment works.

SabreDAV is well known to work on Apache 2 with mod_php. Be sure that these php extensions are active :

This script in a simple test.php page on your server would let you know :

<?php
    phpinfo();
?>
punkyard commented 4 years ago

YES all these extensions are active

if my 3 servers are not right, is there a documentation where I could read the exact server needs of this cdav module for dolibarr to work fine?

or is there any other information about my server that could lead you to help me again?

punkyard commented 4 years ago

( btw, i'm using fruux, which created sabre, and i have no problem using it on every environment i have tested it on. on another website, the cpanel offers a carddav sync based on nextcloud, and it works all fine, mac os and ios )

jpfox commented 4 years ago

Have you enabled a specific authentication method ? 2fa, captcha or other ? it could be incompatible !

You can also enable debug logging to know what is happening while sync. You should find in generated log file some precious information.

In cdav/server.php line 32 remove comments and specify a path where server is enable to write :

// debug in cdav module folder
$debug_file = fopen( __DIR__ . '/cdav_'.date('Ymd').'.log','a');
// $debug_file = false;
punkyard commented 4 years ago

no, no authentification method

i've created a 'log' folder : should it be : 32 $debugfile = fopen( '/log/' . '/cdav'.date('Ymd').'.log','a'); 33 $debug_file = false;

you told me about the server specifications before. can you tell me which server i should use? amongst 3 i'm using, is there one i should run these tests on? do you reckon the localhost version (mamp) could be the most appropriate to run these tests?

punkyard commented 4 years ago

do you acknoledge the fact that i can login through the URL designated in the URL CardDAV menu?

http://localhost:8888/dolibarr-10.0.4/htdocs/cdav/server.php/addressbooks/tresorier/default/ loggin logged

punkyard commented 4 years ago

hi, i moved the module to another online server, and the authentification functioned straight away! so i guess I won't have an explanation for the other servers .. tho, I found no logs ..

so, the account has been added to Contacts on mac os but the contacts won't synch ..

the server is apache, php is fastCGI, php version is on 'default' (the latest being 7.3 on ISPconfig) any lead to move on please ?

punkyard commented 4 years ago

enabling debug logging seems too advanced for me dolibarr is v10

mapiolca commented 2 years ago

I've the same problem... Connection OK, but contacts don't appear..

jpfox commented 2 years ago

A new version has been published with some changes in contact synchronization. You should try it. It permits contacts and thirdparties synchronization (must be activated in module settings).

mapiolca commented 2 years ago

Hi, sync on Mac still impossible... Connection seems OK, but any contact appears yet...

jpfox commented 2 years ago

Have your tried to connect, as punkyard made, with a simple web browser ? What happened ? Are you able to navigate in Sabre DAV directories and find your contacts ? (I just want to know if it is specific to mac or a general server problem)

mapiolca commented 2 years ago

Yes it works. and it works on iOS devices.

Capture d’écran 2022-03-16 à 11 28 03

jpfox commented 2 years ago

and in Node "addressbooks" and then "default", you have a list of contacts ? If so, are you able to open it ? it is a vcf file

mapiolca commented 2 years ago

Yes, I can download the fil Capture d’écran 2022-03-16 à 11 34 06 e

jpfox commented 2 years ago

could you put the url of your last screenshot (ending with default/) in your mac sync settings ?

jpfox commented 2 years ago

There is a debugging option on macos X Maybe you could enable it to see some error messages.

First paragraph : "debuging" on this page : https://sabre.io/dav/clients/osx-addressbook/

mapiolca commented 2 years ago

could you put the url of your last screenshot (ending with default/) in your mac sync settings ?

Done, nothing happened