[horde] Installing horde without access to pear/php cli

Johan Sandblom js at ndblom.se
Fri Apr 20 14:21:19 UTC 2012


 On Fri, 20 Apr 2012 16:02:17 +0200, Jan Schneider wrote:
> Zitat von Johan Sandblom <js at ndblom.se>:
>
>> Vilius Šumskas <vilius at lnk.lt> writes:
>>
>>>> >> Jan Schneider <jan at horde.org> writes:
>>>> >>
>>>> >> > Please keep discussions on the list.
>>>> >> >
>>>> >> > Zitat von Johan Sandblom <js at ndblom.se>:
>>>> >> >
>>>> >> >> Jan Schneider <jan at horde.org> writes:
>>>> >> >>
>>>> >> >>> Zitat von Johan Sandblom <js at ndblom.se>:
>>>> >> >>>
>>>> >> >>>> Hi. I am attempting to install horde on a webhost where 
>>>> SSH access
>>>> is
>>>> >> >>>> granted, but curiously PHP CLI access is not. Getting pear 
>>>> to install
>>>> >> >>>> was possible with some editing of files suggested by the 
>>>> PEAR
>>>> mailing
>>>> >> >>>> list. After that, installing horde/horde-role in the PEAR 
>>>> web
>>>> interface
>>>> >> >>>> was easy. However, the next step, running the post-install 
>>>> script
>>>> >> >>>>
>>>> >> >>>> pear/PEAR/PEAR/Installer/Role/Horde/Role.php
>>>> >> >>>>
>>>> >> >>>> is impossible without access to PHP on the command line. 
>>>> Looking at
>>>> >> the
>>>> >> >>>> script it does not look like it does an inordinate amount  
>>>> of work, but
>>>> >> >>>> it is beyond me to figure out exactly what. Is it possible 
>>>> to edit the
>>>> >> >>>> appropriate configuration files manually, to achieve what 
>>>> the
>>>> >> >>>> post-install script does? If so, which are the appropriate 
>>>> files, and
>>>> >> >>>> what needs to be done?
>>>> >> >>>
>>>> >> >>> I don't know which files exactly you need to edit, but what 
>>>> the script
>>>> >> >>> does is to set the 'horde_dir' configuration variable for 
>>>> the
>>>> >> >>> pear.horde.org' channel in the 'user' configuration. This 
>>>> should
>>>> >> >>> theoretically also be possible through the PEAR web 
>>>> interface.
>>>> >> >>
>>>> >> >> Yes, setting the directory was possible in the PEAR web
>>>> >> >> interface. I successfully installed horde/horde in
>>>> >> >> .../public_html/horde (or at least without error message). 
>>>> However,
>>>> >> >> pointing my browser to that address yields:
>>>> >> >>
>>>> >> >> Warning: require_once(Horde/Autoloader/Default.php)
>>>> >> >> [function.require-once]: failed to open stream: No such file 
>>>> or
>>>> >> >> directory in
>>>> >> >> /.../public_html/horde/lib/core.php on
>>>> >> >> line 47
>>>> >> >>
>>>> >> >> Fatal error: require_once() [function.require]: Failed  
>>>> opening required
>>>> >> >> 'Horde/Autoloader/Default.php'
>>>> >> >>
>>>> >>
>>>> 
>>>> (include_path='/storage/content/86/148886/ndblom.se/public_html/horde/
>>>> >> lib:.:/usr/lib64/php')
>>>> >> >> in /.../public_html/horde/lib/core.php
>>>> >> >> on line 47
>>>> >> >>
>>>> >> >> Any clues?
>>>> >> >
>>>> >> > Your include_path is incorrect. It doesn't point to your PEAR 
>>>> directory.
>>>> >> >
>>>> >> > --
>>>> >> > Jan Schneider
>>>> >> > The Horde Project
>>>> >> > http://www.horde.org/
>>>> >>
>>>> >> OK. I see three elements in this path, the first pointing to
>>>> >> '/.../public_html/horde/lib', the second to '.', and the last 
>>>> to
>>>> >> '/usr/lib64/php'. I assume the second one should be altered to
>>>> >> '/.../pear/PEAR'. I tried putting
>>>> >>
>>>> >> php_value include_path
>>>> >> "/.../public_html/horde/lib:/.../pear/PEAR:/usr/lib64/php"
>>>> >>
>>>> >> in
>>>> >>
>>>> >> /.../public_html/horde/.htaccess
>>>> >>
>>>> >> but with no effect, I get the same
>>>> >> error message, so this directive is apparently ignored.
>>>> >>
>>>> >> I am not very experienced in this regard. Anything else I can 
>>>> try?
>>>> >
>>>> > Do not modify current paths, just add a new one. Do not use  
>>>> relative paths.
>>>> Basically copy full variable from /etc/php.ini then add another  
>>>> ":" character
>>>> and then full path to your PEAR install.
>>>> >
>>>> > --
>>>> >    Vilius
>>>>
>>>> I did. The '/.../' is just my way of deidentifying for the mailing
>>>> list. Any edits I try to make to the path using horde/.htaccess 
>>>> are
>>>> ignored. Can this be altered somehow within horde? Preferably 
>>>> without
>>>> altering all .php files ...
>>>
>>> Create horde.local.php in /horde/config/ folder, and use ini_set()  
>>> to set it. Also check /horde/lib/core.php file for more hints.
>>>
>>> --
>>>    Vilius
>>
>> That worked! Thank you!
>>
>> For documentation purposes, these are the steps to install PEAR and
>> horde on a host with no command line access to php or pear
>>
>> 1. get go-pear.php from http://pear.php.net/go-pear
>>
>> 2. edit that file so that the lines pointing to the bootstrap files
>> (around line 115) become
>>
>> $bootstrap_files = array(
>>                          'PEAR.php'             =>  
>> 'http://svn.php.net/viewvc/pear/pear-core/branches/PEAR_1_4/PEAR.php?view=co&pathrev=319707',
>>     'Archive/Tar.php'      =>  
>> 'http://svn.php.net/viewvc/pear/packages/Archive_Tar/tags/Archive_Tar-1.3.7/Archive/Tar.php?view=co&pathrev=325163',
>>     'Console/Getopt.php'   =>  
>> 'http://svn.php.net/viewvc/pear/pear-core/branches/PEAR_1_4/Console/Getopt.php?view=co&pathrev=319707',
>>     );
>>
>> This is necessary because of the pear project to github. The new 
>> file
>> go-pear.phar does not include a web interface
>>
>> 3. make a directory that is not web-accessible eg PATH/pear
>>
>> 4. put the modified go-pear.php in your web-accessible pages eg
>> PATH/public_html and install pear in PATH/pear
>>
>> 5. copy index.php from PATH/pear to PATH/public_html and edit so 
>> that
>> $pear_dir = 'PATH/pear/PEAR'
>>
>> 6. navigate to that file and configure PEAR by adding channel
>> pear.horde.org and installing the packages enumerated in the horde
>> documentation: Crypt_Blowfish, Net_DNS2 and Services_Weather
>>
>> 7. install the package horde/horde_role
>>
>> 8. go to the configuration page of PEAR and edit the value of 'Base
>> Horde directory' to eg /PATH/public_html/horde
>>
>> 9. install the package horde/horde
>>
>> 10. navigate to your horde directory
>>
>> 11. if it does not work, create 
>> public_html/horde/config/horde.local.php
>> to contain
>>
>> <?php
>> ini_set('include_path', '.:PATH/pear/PEAR:CURRENT_INCLUDE_PATH');
>>
>> 12. and there you go!
>
> You should put that in the wiki!
>
> --
> Jan Schneider
> The Horde Project
> http://www.horde.org/

 Indeed. Here:

 http://wiki.horde.org/HowTo/InstallingPEARandHordeWithoutCLI

 Regards, Johan
-- 
 Johan Sandblom, MD PhD
 m +46735521477
 What is wanted is not the will to believe, but the
 will to find out, which is the exact opposite
 --Bertrand Russell


More information about the horde mailing list