I come across several minor issues while using carddav-2-fritzbox for importing posteo addressbook to a Fritzbox 1312 (comes without USB and NAS):
Here is the output of the script and the errors and warnings:
fr@fr-HP:/etc/cron.daily$ ./import_posteo_to_fritzbox
carddav2fb.php - CardDAV to FRITZ!Box conversion tool
Copyright (c) 2012-2015 Karl Glatz, Martin Rost, Jens Maus
1 As you see, I'm running the script daily via cron. Cron writes a mail whenever there is output. Could carddav2fb get an option to run silent
, that is less verbose?
Retrieving VCards from all CardDAV server(s):
https://posteo.de:8443/addressbooks/username/default/
116 VCards retrieved
PHP Notice: Undefined offset: 0 in /home/fr/technix/carddav2fb/carddav2fb.php on line 189
PHP Notice: Undefined offset: 0 in /home/fr/technix/carddav2fb/carddav2fb.php on line 194
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Notice: Undefined offset: 0 in /home/fr/technix/carddav2fb/carddav2fb.php on line 189
PHP Notice: Undefined offset: 0 in /home/fr/technix/carddav2fb/carddav2fb.php on line 194
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/lib/vCard-parser/vCard.php on line 320
2 Seems to be some kind of problem here? umlauts maybe?
Done.
Converting VCards to FritzBox XML format:
VCard: Name, Vorname
Added phone: 09999999 (home)
Added email: [email protected] (home)
... repeats for each contact ...
...
VCard: Name, Gr๏ฟฝne Neune
Added phone: +999 (mobile)
PHP Warning: Illegal string offset 'value' in /home/fr/technix/carddav2fb/carddav2fb.php on line 376
3 Seems like there are problems with Umlauts and other not-ASCII characters.
Done.
Upload data to FRITZ!Box @ fritz.box
PHP Warning: ftp_set_option() expects parameter 1 to be resource, boolean given in /home/fr/technix/carddav2fb/carddav2fb.php on line 444
PHP Warning: ftp_login() expects parameter 1 to be resource, boolean given in /home/fr/technix/carddav2fb/carddav2fb.php on line 445
PHP Warning: ftp_pasv() expects parameter 1 to be resource, boolean given in /home/fr/technix/carddav2fb/carddav2fb.php on line 446
PHP Warning: ftp_nlist() expects parameter 1 to be resource, boolean given in /home/fr/technix/carddav2fb/carddav2fb.php on line 450
PHP Warning: ftp_mkdir() expects parameter 1 to be resource, boolean given in /home/fr/technix/carddav2fb/carddav2fb.php on line 452
FTP-Upload: xxx.jpg
PHP Warning: ftp_put() expects parameter 1 to be resource, boolean given in /home/fr/technix/carddav2fb/carddav2fb.php on line 465
WARNING: an error occurred while uploading file xxx.jpg - retrying
PHP Warning: ftp_login() expects parameter 1 to be resource, boolean given in /home/fr/technix/carddav2fb/carddav2fb.php on line 470
PHP Warning: ftp_pasv() expects parameter 1 to be resource, boolean given in /home/fr/technix/carddav2fb/carddav2fb.php on line 471
PHP Warning: ftp_put() expects parameter 1 to be resource, boolean given in /home/fr/technix/carddav2fb/carddav2fb.php on line 472
ERROR: an error occurred while uploading file xxx.jpg - giving up
... repeats for all images...
4 There are warnings about wrong parameters.
5 The ERROR is clear: This Fritzbox 1312 has no usb and nas. Could there be an option to disable photo uploading? Or even better that carddav2fb automatically checks if the fritzbox has NAS option in the first place?
PHP Warning: ftp_close() expects parameter 1 to be resource, boolean given in /home/fr/technix/carddav2fb/carddav2fb.php on line 482
6 Again wrong parameter.
Uploading Phonebook XML
FRITZ!Box returned message: 'FRITZ!Box Telefonbuch wiederhergestellt'
Done.
Funny thing: Despite all the warnings: It works :) except that there are no photos as expected.