carlos22 / carddav2fb

:notebook: A command-line PHP script allowing to import CardDAV-based VCards (e.g. from 'owncloud') to a phonebook in a AVM FRITZ!Box
The Unlicense
86 stars 67 forks source link

Fatal error on Windows #22

Open ghost opened 7 years ago

ghost commented 7 years ago

Hello!

I get this error:

Retrieving VCards from all CardDAV server(s):

Fatal error: Uncaught Error: Call to undefined function CardDavPHP\curl_init() in C:\path\to\carddav2fb\lib\CardDAV-PHP\carddav.php:647 Stack trace:

0 C:\path\to\carddav2fb\lib\CardDAV-PHP\carddav.php(679): CardDavPHP\CardDavBackend->curlInit()

1 C:\path\to\carddav2fb\lib\CardDAV-PHP\carddav.php(328): CardDavPHP\CardDavBackend->query('https://xyzabcd...', 'PROPFIND')

2 C:\path\to\carddav2fb\carddav2fb.php(217): CardDavPHP\CardDavBackend->get()

3 C:\path\to\carddav2fb\carddav2fb.php(79): CardDAV2FB->get_carddav_entries()

4 {main}

thrown in C:\path\to\carddav2fb\lib\CardDAV-PHP\carddav.php on line 647

May you help me? And tell me what to do in order to get this nice script working?

Thanks a lot!

carlos22 commented 7 years ago

You need to enable php-curl (which should be part of your windows distribution) using php.ini, see: http://php.net/manual/en/install.pecl.windows.php#install.pecl.windows.loading The project requires (as stated in the Readme): curl, ftp, mbstring

ghost commented 7 years ago

Thank you. I edited the php.ini-production, but it doesn't work yesterday. After renaming the file to php.ini it works. Thanks a lot! Great work!

But the script doesn't fetch any "#" in the phone numbers. For example:

31#+49151 12 34 56 78 -> 31+49151 12 34 56 78

The #31# suppresses the caller ID. Can you provide this feature?