[horde] Directory problem with horde alarms

Luis Felipe Marzagao lfbm.andamentos at gmail.com
Sat Nov 22 12:01:03 UTC 2014


On 22-11-2014 09:28, Erling Preben Hansen wrote:
>  Citat af Luis Felipe Marzagao <lfbm.andamentos at gmail.com>:
>
>> On 21-11-2014 13:57, Jan Schneider wrote:
>>> Zitat von Louis-Philippe Allard <lp.allard.1 at gmail.com>:
>>>
>>>> On Fri, Nov 21, 2014 at 6:53 AM, Jan Schneider <jan at horde.org> wrote:
>>>>
>>>>> Zitat von Jan Schneider <jan at horde.org>:
>>>>>
>>>>> Zitat von Louis-Philippe Allard <lp.allard.1 at gmail.com>:
>>>>>> Quoting Luis Felipe Marzagao <lfbm.andamentos at gmail.com>:
>>>>>>> On 21-11-2014 00:08, Louis-Philippe Allard wrote:
>>>>>>>>> I have setup a cronjob for the horde alarms reminders which runs
>>>>>>>>> every
>>>>>>>>> 5
>>>>>>>>> minutes.
>>>>>>>>>
>>>>>>>>> Upon setting up proper email MTA backend, I started receiving
>>>>>>>>> emails
>>>>>>>>
>>>>>>>> from
>>>>>>>
>>>>>>>> the server every time the cron job ran.  The email contains
>>>>>>>>> PHP Warning:
>>>>>>>>
>>>>>>>> require_once(/usr/share/pear/www/horde/lib/Application.php):
>>>>>>>
>>>>>>>> failed to open stream: No such file or directory in
>>>>>>>>>
>>>>>>>>
>>>>>>>> /usr/bin/horde-alarms
>>>>>>>
>>>>>>>> on line 21
>>>>>>>>> PHP Fatal error: require_once(): Failed opening required
>>>>>>>>> '/usr/share/pear/www/horde/lib/Application.php'
>>>>>>>>> (include_path='.:/usr/share/pear:/usr/share/php') in
>>>>>>>>> /usr/bin/horde-alarms
>>>>>>>>> on line 21
>>>>>>>>
>>>>>>>> I think you have something wrong with your configuration. The path
>>>>>>>> being
>>>>>>>> search is really odd (/usr/share/pear/www/horde/lib/).
>>>>>>>>
>>>>>>>> I wonder if this shouldnt be addressed by the setup instructions
>>>>>>>> of the
>>>>>>>>> webmail?
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> Horde mailing list
>>>>>>>> Frequently Asked Questions: http://horde.org/faq/To unsubscribe,
>>>>>>>> mail:
>>>>>>>> horde-unsubscribe at lists.horde.org
>>>>>>>
>>>>>>> Hello there,  I agree something is wrong but this is the result of
>>>>>>> following the webmail install instructions to the letter on a fresh
>>>>>>> centos
>>>>>>> 7 virtual machine... Perhaps something is different on Centos and
> the
>>>>>>> webmail install instructions on horde's website needs to be
>>>>>>> modified??
>>>>>
>>>>> The cronjob is not using the same configuration that you used for
>>>>>> installing horde.
>>>>>
>>>>> *PEAR* configuration, that is.
>>>>>
>>>>> -- 
>>>>> Jan Schneider
>>>>> The Horde Project
>>>>> http://www.horde.org/
>>>>> https://www.facebook.com/hordeproject
>>>>>
>>>>> -- 
>>>>> Horde mailing list
>>>>> Frequently Asked Questions: http://horde.org/faq/
>>>>> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>>>>
>>>> Thanks Jan,  can you however clarify how to setup the cronjob pear
>>>> environment properly? Is there a wiki entry for this? Finally,
>>>> shouldn't
>>>> this done by the install script?
>>>> Sounds highly unusual to have to setup something like that after a
>>>> framework is installed, that is, without this occurrence being
>>>> documented
>>>> or indicated anywhere..
>>>>
>>>> Just trying to make this work without errors and help improve Horde's
>>>> user-friendliness!
>>
>> I assume your the cron job run as root. So you should check as root (not
>> using sudo) what is the php_dir option configured to in PEAR:
>>
>> Example:
>>
>> root at myserver:~# pear config-show
>>
>> ...
>>
>> PEAR directory                 php_dir
> /usr/share/php
>>
>> ...
>>
>> You must have something wrong there. You can fix it using the command
>> pear config-set, like this:
>>
>> root at myserver:~# pear config-set php_dir /usr/share/php
>>
>> But remember to run it as root (not just using sudo), in order to get ir
>> right.
>>
>> Hope it helps.
>>
>>>> Cheers!
>>>
>>> You either run the script as a different user than the one you used for
>>> installing Horde (or rather: for configuring the horde_dir
>>> configuration setting via the Horde_Role post-install script), and one
>>> of these users has a custom PEAR configuration. See user configuration
>>> in the PEAR docs.
>>> Or you specified a custom configuration or configuration file during
>>> the Horde installation, and failed to pass the same configuration when
>>> running the script. This is documented in the install docs.
>>
>> -- 
>> Horde mailing list
>> Frequently Asked Questions: http://horde.org/faq/To unsubscribe, mail:
>> horde-unsubscribe at lists.horde.org
>
> Hey
>
> There is nothing wrong doing by using sudo with PEAR.
> I Do it all the time.
> Never had any troubles with that.

Sure, there is no problem. It's just to make sure he is setting the pear 
option for the correct user (the one that runs the cron jobs.)


> I don't use use root login on any of my servers.
>
> /erling



More information about the horde mailing list