[horde] Using horde API to save data in calendar
Ferdinand Gruber
fer.grub at yahoo.de
Wed Feb 5 13:29:37 UTC 2020
Am 05.02.20 um 13:09 schrieb Ralf Lang:
> Hi,
>
> Am 27.01.20 um 23:06 schrieb Ferdinand Gruber:
>> Hi,
>>
>> now, Horde Kronolith is working on my testsystem and I am trying to
>> pass $_POST data to my kronolith calendar.
>>
>> $eol = PHP_EOL;
>>
>> $ical =
>> "BEGIN:VCALENDAR".$eol."
>> VERSION:2.0".$eol."
>> BEGIN:VEVENT".$eol."
>> DTSTART:".$_POST["event_start"].$eol."
>> DTEND:".$_POST["event_end"].$eol."
>> ...
>>
>> require_once '/srv/www/htdocs/horde/kronolith/lib/Application.php';
>> Horde_Registry::appInit('kronolith', array());
>> $registry->setAuth('user_name', array('password'=>'the_passwd'),
>> array());
>> $registry->call('calendar/put',array('kronolith/user_name',$ical,"text/calendar"));
>>
>>
>> First I got an error that
>> /usr/share/php7/PEAR/Horde/Autoloader/Cache.php is missing
>>
>> I looked in the documentation and then I installed
>>
>> pear install horde/horde_autoloader_cache
>>
>> Now I get this error
>>
>> file_get_contents(/tmp/horde_autoloader_cache_71a082229a5386a280b68808643dcbdb):
>> failed to open stream: Datei oder Verzeichnis nicht gefunden
>>
>> #2
>> /usr/share/php7/PEAR/Horde/Autoloader/Cache/Bootstrap.php(110):file_get_contents()
>> #3
>> /usr/share/php7/PEAR/Horde/Autoloader/Cache.php(89):Horde_Autoloader_Cache_Bootstrap->get()
>> #4
>> /usr/share/php7/PEAR/Horde/Autoloader/Cache.php(206):Horde_Autoloader_Cache->__construct()
>> #5 /srv/www/htdocs/horde/lib/core.php(48):include_once()
>> #6 /srv/www/htdocs/horde/kronolith/lib/Application.php(33):require_once()
>> #7 /srv/www/include/php/kronolith.php(24):require_once()
>>
>> What can I do? Thank you for each hint.
>>
> Most likely the apache/www user or the user which runs your cli script
> cannot write to /tmp/.
>
> Autoloader_Cache should be optional.
>
> Using the Horde API / RPC mechanisms xmlrpc or jsonrpc may require
> additional php extensions. Using local communication for horde php API
> doesn't.
> --
Thank you for your answer.
Because I did not get it to work I decided to choose a "dirty" way.
I found a cli script kronolith-import-icals.php on github.com. I called
this script using the PHP command shell_exec
shell_exec("php
/srv/www/htdocs/horde/kronolith/bin/kronolith-import-icals.php '".
$cal."' '".$user."' '".$pw."' '".$ical."'");
Before I made some changes in the script kronolith-import-icals.php.
so that I can pass the ICS string to the script.
But now I consider to check the system settings / modules of my local
apache2 server and then try again the common way ...
Regards from Austria
Ferdinand Gruber
More information about the horde
mailing list