[horde] Problem with PEAR horde_dir setting

Luis Felipe Marzagao lfbm.andamentos at gmail.com
Sat Dec 29 02:34:01 UTC 2012


Em 28-12-2012 15:52, Jan Schneider escreveu:
>
> Zitat von Luis Felipe Marzagao <lfbm.andamentos at gmail.com>:
>
>> Hello:
>>
>> Everytime I install horde on a new machine (ubuntu), and after 
>> running horde/horde_role script, although I specify horde directory 
>> as being /var/www/horde, pear's horde_dir config is always set as 
>> /usr/share/php/www/horde:
>>
>> Base Horde directory           horde_dir /usr/share/php/www/horde
>>
>> Despite that, pear manages to install horde just fine in the correct 
>> path (/var/www/horde).
>>
>> But this setting (horde_dir) affects horde scripts and makes cron 
>> report php errors from horde-alarms and kronolith-agenda, because 
>> they cannot find include files, as below:
>>
>> horde-alarms:
>>
>> PHP Warning: 
>> require_once(/usr/share/php/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/php/www/horde/lib/Application.php' 
>> (include_path='.:/usr/share/php:/usr/share/pear') in 
>> /usr/bin/horde-alarms on line 21
>>
>> kronolith-agenda:
>>
>> PHP Warning: 
>> require_once(/usr/share/php/www/horde/kronolith/lib/Application.php): 
>> failed to open stream: No such file or directory in 
>> /usr/bin/kronolith-agenda on line 19 PHP Fatal error: require_once(): 
>> Failed opening required 
>> '/usr/share/php/www/horde/kronolith/lib/Application.php' 
>> (include_path='.:/usr/share/php:/usr/share/pear') in 
>> /usr/bin/kronolith-agenda on line 19
>>
>> If I manually fix the path of horde_dir to /var/www/horde (via pear 
>> config-set ...), then horde-alarms and kronolith-agenda run just 
>> fine, with no erros.
>>
>> I don't know pear internals and I wonder if this is the desired 
>> behavior. Why does pear's horde_dir default to /usr/share/php/www and 
>> not /var/www/horde as specified during horde_role?
>>
>> Thanks  lot,
>> Luis Felipe
>
> Do you run the scripts with a different user than you used to install 
> Horde? Do you use a separate PEAR installation for Horde?

In Ubuntu I always do everything that requires admin privilege using 
"sudo command". So it is with pear commands. I execute it like "sudo 
pear install ...",  "sudo pear run-scripts ..." and so on.

No, I never create separate pear installation for horde. I use the 
system's defaults.

I'll do another test with a VM doing everything directly as root (no 
sudo) to see what happens and then I'll report back.


More information about the horde mailing list