From jan at horde.org Wed Mar 17 20:26:40 2021 From: jan at horde.org (Jan Schneider) Date: Wed, 17 Mar 2021 20:26:40 +0000 Subject: [kronolith] Howto use the kronolith API In-Reply-To: <3f86ed23-67e4-6127-76ee-6b2182961cae@yahoo.de> References: <20210206172019.Horde.YZyjWjc2FEobRt4PxGcoDpF@tarn.theupstairsroom.com> <7aa8fa27-3766-949d-802b-44900d8039aa@yahoo.de> <20210210161132.Horde.xqQ87FwcvdyizTrKTPx0Wkh@tarn.theupstairsroom.com> <20210211194510.Horde.FCkR9lc75cYMVbGkP7bAZj4@yunosh.horde.org> <99dee10e-bfe1-71e7-e44a-0ba016a0f9d3@yahoo.de> <1c01f8e4-6ce2-aca2-a6cd-d2c6f17b4ade@yahoo.de> <20210217180540.Horde.DdMQbEPqupyWUtRM9sCspN_@yunosh.horde.org> <3f86ed23-67e4-6127-76ee-6b2182961cae@yahoo.de> Message-ID: <20210317202640.Horde.5N_f1bo7xZbhxjags7yj6Wp@yunosh.horde.org> Zitat von Ferdinand Gruber : > Am 17.02.21 um 19:05 schrieb Jan Schneider: >> >> Zitat von Ferdinand Gruber : >> >>> Am 12.02.21 um 17:58 schrieb Ferdinand Gruber: >>>>>> >>>>>> Content_Tagger class not found. Please make sure that the >>>>>> "Content" application is installed >>>>> >>>>> Well, is it installed? ;-) >>>>> >>>> >>> Now I found out, that before this message there are some other >>> errors in the log of the server. >>> >>> journalctl: >>> >>> ini_set(): A session is active. You cannot change the session >>> module's ini settings at this time >>> session_set_cookie_params(): Cannot change session cookie >>> parameters when session is active >>> session_cache_limiter(): Cannot change cache limiter when session is active >>> session_name(): Cannot change session name when session is active >>> ReflectionException: Class IMP_Factory_Imap does not exist in >>> /usr/share/php7/PEAR/Horde/Injector/Binder/Implementation.php:65 >>> >>> ... >>> >>> Seems there is something wrong with SESSION management. Is there >>> is a conflict between the SESSION that has been startet before >>> from my PHP script and the SESSION that horde has started? >>> >>> How can I solve this? >>> >>> I also tried some simplifiction in the code of the script snippet >>> that causes the errors: >>> >>> require_once '/srv/www/htdocs/horde/kronolith/lib/Application.php'; >>> Horde_Registry::appInit('kronolith', array()); >>> >>> $registry->setAuth($user, array("password"=>$pw)); >>> >>> try { >>>     $result = $registry->call('calendar/import', array($ical, >>> 'text/calendar', $calendar_id)); >>> } catch (Horde_Exception $e) { >>>     $cli->fatal($e->getMessage()); >>> } >>> >>> Is this correct? >>> >> Looks legit. >> > What can I do in my PHP script to avoid the following error? > > HORDE[4016]: PHP ERROR: ini_set(): Headers already sent. You cannot > change the session module's ini settings at this time ... on line > 159 of "/usr/share/php7/PEAR/Horde/Session.php"] > > This is the first error that appears after my script calls: > > Horde_Registry::appInit('kronolith', array(); > > Thanks for each hint even it is short. Exactly what it says. You somehow already generated output before this code is called. -- Jan Schneider The Horde Project https://www.horde.org/