[horde] Install horde with composer

Brent impuser at bitrealm.com
Sat Jan 21 18:29:05 UTC 2023


  Quoting Ferdinand Gruber <fer.grub at yahoo.de>:

> Am 21.01.23 um 00:59 schrieb Brent:
>>  Quoting Ferdinand Gruber <fer.grub at yahoo.de>:
>>
>>> Am 20.01.23 um 18:59 schrieb Brent:
>>>>  Quoting Ferdinand Gruber <fer.grub at yahoo.de>:
>>>>
>>>>> Am 20.01.23 um 16:01 schrieb Brent:
>>>>>>  Quoting Ferdinand Gruber <fer.grub at yahoo.de>:
>>>>>>
>>>>>>> I haven't been able to get Horde to work since I upgraded my  
>>>>>>> server to PHP8.
>>>>>>>
>>>>>>> Therefore I tried to make a new install of horde with composer  
>>>>>>> on my server (openSUSE 15.4)
>>>>>>>
>>>>>>> As described in  
>>>>>>> https://github.com/horde/horde-deployment#readme I entered the  
>>>>>>> following commands.
>>>>>>>
>>>>>>> |git clone  
>>>>>>> https://github.com/maintaina-com/horde-deployment.git horde cd  
>>>>>>> /srv/www/htdocs/horde composer install|
>>>>>>>
>>>>>>> That worked without problems.
>>>>>>>
>>>>>>> I have little experience with composer, so I don't understand  
>>>>>>> the next instruction in the readme file.
>>>>>>>
>>>>>>> "Then copy the main horde config file to point your web server  
>>>>>>> root to the web/ subdir"
>>>>>>>
>>>>>>> From where should I copy what kind of file to what folder? Of  
>>>>>>> course I backuped all horde files.
>>>>>>>
>>>>>>> Is it necessary to set up a new named virtual host to access  
>>>>>>> the new horde site? Is the new documentroot for  
>>>>>>> Hoerde|srv/www/htdocs/horde/web ?
>>>>>>> |
>>>>>>>
>>>>>>> Please give me a hint? Thank you in advance.
>>>>>>>
>>>>>>> --
>>>>>>> Regards from Austria
>>>>>>> Ferdinand Gruber
>>>>>>> --
>>>>>>> Horde mailing list
>>>>>>> Frequently Asked Questions: http://horde.org/faq/To  
>>>>>>> unsubscribe, mail: horde-unsubscribe at lists.horde.org
>>>>>>
>>>>>> In my case, my composer install is in "/var/www/html/horde".  
>>>>>> The webroot becomes "/var/www/html/horde/web" and so I updated  
>>>>>> my apache config to reflect that location.
>>>>>>
>>>>>> You then just copy  
>>>>>> "/var/www/html/horde/web/horde/config/conf.php.dist" to  
>>>>>> "/var/www/html/horde/web/config/conf.php" and then you should  
>>>>>> be able to connect to the admin interface and start setting  
>>>>>> things up the way you want.
>>>>>>
>>>>>> brent
>>>>>
>>>>> Thank you, that helped.
>>>>>
>>>>> I created a Virtuel Host for Horde on the webserver.
>>>>>
>>>>> Then I copied the conf.php from the former horde installation to  
>>>>> /srv/www/htdocs/horde/var/config/horde/. Hope that is okay.  
>>>>> Anyway, now the Login page of Horde appears in the web browser.
>>>>>
>>>>> After entering username and password I get this errors:
>>>>>
>>>>> *Warning*:  
>>>>> require_once(/srv/www/htdocs/horde/vendor/vendor/autoload.php):  
>>>>> Failed to open stream: No such file or directory in  
>>>>> */srv/www/htdocs/horde/vendor/horde/horde/rampage.php* on line *2*
>>>>>
>>>>> *Fatal error*: Uncaught Error: Failed opening required  
>>>>> '/srv/www/htdocs/horde/vendor/vendor/autoload.php'  
>>>>> (include_path='.:/usr/share/php8:/usr/share/php/PEAR') in  
>>>>> /srv/www/htdocs/horde/vendor/horde/horde/rampage.php:2 Stack  
>>>>> trace: #0 {main} thrown in  
>>>>> */srv/www/htdocs/horde/vendor/horde/horde/rampage.php* on line *2*
>>>>
>>>> Ensure that you have the re-write stuff set for your webroot  
>>>> directory and that your web server user can read the files there.
>>>>
>>>> For me:
>>>>
>>>> <Directory /var/www/html/horde/web>
>>>>     AllowOverride All
>>>> </Directory>
>>>>
>>>> In your webroot directory for horde, ensure you also have the  
>>>> right .htaccess. The web user needs to be able to be able to  
>>>> write there. Here's mine:
>>>>
>>>> # IMPORTANT: DO NOT EDIT THIS FILE!
>>>> # It will be overwritten with any future upgrade.
>>>>
>>>> <IfModule authz_core_module>
>>>>     Require all granted
>>>> </IfModule>
>>>> <IfModule !authz_core_module>
>>>>     Allow from all
>>>> </IfModule>
>>>>
>>>> <IfModule mod_rewrite.c>
>>>>     RewriteEngine On
>>>>     RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
>>>>     RewriteRule .* -  
>>>> [env=REDIRECT_HTTP_AUTHORIZATION:%{HTTP:Authorization}]
>>>>     # Catch everything ending exactly in rpc.php
>>>>     RewriteRule ^rpc\.php$ horde/rpc.php [QSA,L]
>>>>     # Catch all rewrites under rpc.php
>>>>     RewriteRule ^rpc\.php(.*)$ horde/rpc.php/$1[1][1] [QSA,L]
>>>>     # Catch everything in the /rpc/ dir
>>>>     RewriteRule ^rpc/(.*)$ horde/rpc.php/$1[1][1] [QSA,L]
>>>>     ## Catch /rpc without trailing slash but not /rpcsomething
>>>>     RewriteRule ^rpc$ horde/rpc.php/ [QSA,L]
>>>>
>>>>     ## Forward from traditional login location to subdir
>>>>     RewriteCond   login.php  !-d
>>>>     RewriteCond   login.php  !-f
>>>>     RewriteRule login.php(.*)$ horde/login.php$1 [QSA,L]
>>>>
>>>>     ## Forward remaining requests to rampage controller framework
>>>>     RewriteRule ^rpc$ horde/rpc.php/ [QSA,L]
>>>>     RewriteCond   %{REQUEST_FILENAME}  !-d
>>>>     RewriteCond   %{REQUEST_FILENAME}  !-f
>>>>     RewriteRule ^(.*)$ horde/rampage.php [QSA,L]
>>>>
>>>>     RewriteCond %{REQUEST_FILENAME} !-f
>>>>     RewriteCond %{DOCUMENT_ROOT}/$1/index.php !-f
>>>>     RewriteRule ^(.*?)/?$ horde/rampage.php [L]
>>>>
>>>> </IfModule>
>>>>
>>>> Are you running the dev6 branch for this? There should be no need  
>>>> for any of the old pear horde stuff. What's your authentication  
>>>> backend? Is it IMP? When you first copied the .dist to conf.php,  
>>>> you should have been able to get in without a login. Some of the  
>>>> old config files aren't directly compatible, so you might not be  
>>>> able to copy those from your previously-working configuration.
>>>>
>>>> brent
>>>
>>> The .htacces file in my /srv/www/htdocs/horde/web seems exactly  
>>> the same as you posted here.
>>>
>>> Require all granted is also set in  
>>> /etc/apache2/default-server.conf for the webroot directory:
>>>
>>> <Directory /srv/www/htdocs>
>>>        Options FollowSymlinks
>>>        IndexIgnoreReset ON
>>>        # AllowOverride None
>>>        AllowOverride All
>>>        Require all granted
>>> </Directory>
>>>
>>> Of course the file  
>>> /srv/www/htdocs/horde/vendor/vendor/autoload.php does not exist.  
>>> inside the vendor folder there is not another vendor folder.
>>>
>>> The webroot of horde in my system is /srv/www(htdocs/horde/web
>>>
>>> In the browser I call the site with www.example.com/horde/web[2][2].
>>>
>>> What is wrong there?
>>>
>>> --
>>> Regards from Austria
>>> Ferdinand Gruber
>>> --
>>> Horde mailing list
>>> Frequently Asked Questions: http://horde.org/faq/To unsubscribe,  
>>> mail: horde-unsubscribe at lists.horde.org
>>
>> I set my document root for horde to be the "web" directory from the  
>> composer install. I've tried changing it on a test server to be  
>> just the html directory so I would need to append the "/horde/web"  
>> like your configuration and get a 500 error. Offhand, I don't know  
>> how the document root impacts a horde install. I'm messing around  
>> to see if I can find what else needs to be done if the DocumentRoot  
>> isn't the "web" directory from composer.
>>
>> So, I have "mail.example.com" set to use the composer "web" as the  
>> root for that ServerName request in apache. It's easier for users  
>> too as they don't need to remember to append "/horde/web" to their  
>> client setups.
>>
>> brent
>
> Now I went back using a virtualHost configuration.
>
> This is part of the virtualHost config file  
> /etc/apache2/vhosts.d/horde.grubit.at.conf
>
> DocumentRoot /srv/www/htdocs/horde/web
>   <Directory "/srv/www/htdocs/horde/web">
>        Options FollowSymLinks
>        AllowOverride All
>        Require all granted
>   </Directory>
>
> First I entered the command: composerhorde-reconfigure
>
> Then I called the site in the web browser (this is the real link):  
> http://horde.grubit.at
>
> I get this errors in the apache LOG:
>
> [php:warn] [pid 12931] [client 193.81.105.87:60618] PHP Warning:  
> require_once(/srv/www/htdocs/horde/vendor/vendor/autoload.php):  
> Failed to open stream: No such file or directory in  
> /srv/www/htdocs/horde/vendor/horde/horde/rampage.php on line 2
>
> [php:error] [pid 12931] [client 193.81.105.87:60618] PHP Fatal  
> error:  Uncaught Error: Failed opening required  
> '/srv/www/htdocs/horde/vendor/vendor/autoload.php'  
> (include_path='.:/usr/share/php8:/usr/share/php/PEAR') in  
> /srv/www/htdocs/horde/vendor/horde/horde/rampage.php:2\nStack  
> trace:\n#0 {main}\n  thrown in  
> /srv/www/htdocs/horde/vendor/horde/horde/rampage.php on line 2
>
> [php:warn] [pid 12943] [client 193.81.105.87:60620] PHP Warning:  
> require_once(/srv/www/htdocs/horde/vendor/vendor/autoload.php):  
> Failed to open stream: No such file or directory in  
> /srv/www/htdocs/horde/vendor/horde/horde/rampage.php on line 2,  
> referer: http://horde.grubit.at/install.php
>
> [php:error] [pid 12943] [client 193.81.105.87:60620] PHP Fatal  
> error:  Uncaught Error: Failed opening required  
> '/srv/www/htdocs/horde/vendor/vendor/autoload.php'  
> (include_path='.:/usr/share/php8:/usr/share/php/PEAR') in  
> /srv/www/htdocs/horde/vendor/horde/horde/rampage.php:2\nStack  
> trace:\n#0 {main}\n  thrown in  
> /srv/www/htdocs/horde/vendor/horde/horde/rampage.php on line 2,  
> referer: http://horde.grubit.at/install.php
>
> [php:warn] [pid 12927] [client 193.81.105.87:39520] PHP Warning:  
> require_once(/srv/www/htdocs/horde/vendor/vendor/autoload.php):  
> Failed to open stream: No such file or directory in  
> /srv/www/htdocs/horde/vendor/horde/horde/rampage.php on line 2
>
> [php:error] [pid 12927] [client 193.81.105.87:39520] PHP Fatal  
> error:  Uncaught Error: Failed opening required  
> '/srv/www/htdocs/horde/vendor/vendor/autoload.php'  
> (include_path='.:/usr/share/php8:/usr/share/php/PEAR') in  
> /srv/www/htdocs/horde/vendor/horde/horde/rampage.php:2\nStack  
> trace:\n#0 {main}\n  thrown in  
> /srv/www/htdocs/horde/vendor/horde/horde/rampage.php on line 2
>
> [php:warn] [pid 12928] [client 193.81.105.87:39534] PHP Warning:  
> require_once(/srv/www/htdocs/horde/vendor/vendor/autoload.php):  
> Failed to open stream: No such file or directory in  
> /srv/www/htdocs/horde/vendor/horde/horde/rampage.php on line 2,  
> referer: http://horde.grubit.at/install.php
>
> [php:error] [pid 12928] [client 193.81.105.87:39534] PHP Fatal  
> error:  Uncaught Error: Failed opening required  
> '/srv/www/htdocs/horde/vendor/vendor/autoload.php'  
> (include_path='.:/usr/share/php8:/usr/share/php/PEAR') in  
> /srv/www/htdocs/horde/vendor/horde/horde/rampage.php:2\nStack  
> trace:\n#0 {main}\n  thrown in  
> /srv/www/htdocs/horde/vendor/horde/horde/rampage.php on line 2,  
> referer: http://horde.grubit.at/install.php
>
> In the web browser I see, that the browser is redirected to a non  
> existing login page.
>
> Please try the following link above to see my real scenario. I  
> temporarly  removed all https stuff to enable conveniant testing..
>
> http://horde.grubit.at
>
> --
> Regards from Austria
> Ferdinand Gruber
> --
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/To unsubscribe,  
> mail: horde-unsubscribe at lists.horde.org

Well, going to your URL listed is landing me on  
"https://horde/login.php", no domain or anything. Something is  
redirecting and dropping the URL.

If I go to your site with "login.php"  
(http://horde.grubit.at/login.php), then I get:

A fatal error has occurred
"" driver (for Horde_Auth not found).
Details have been logged for the administrator.

If you just copy the conf.php.dist to conf.php in the horde/config  
directory, can you get to the admin setup screen?

In your composer.json file (where you run composer), what's in your  
"require" section?  Here's mine:

    "require": {
        "composer-plugin-api": "^2.0",
        "horde/horde-installer-plugin": "^2.5.1 || dev-FRAMEWORK_6_0  
|| dev-master",
        "horde/horde": "^6 || dev-FRAMEWORK_6_0",
        "horde/routes": "^3 || dev-FRAMEWORK_6_0",
        "horde/hordectl": "^1 || dev-FRAMEWORK_6_0 || dev-master",
        "pear/console_color2": "^0.1.2",
        "pear/console_table": "^1.3",
        "horde/imp": "dev-FRAMEWORK_6_0",
        "horde/memcache": "dev-FRAMEWORK_6_0",
        "horde/cache": "dev-FRAMEWORK_6_0",
        "horde/turba": "dev-FRAMEWORK_6_0",
        "horde/kronolith": "dev-FRAMEWORK_6_0",
        "horde/mapi": "dev-FRAMEWORK_6_0",
        "horde/nag": "dev-FRAMEWORK_6_0",
        "horde/ingo": "dev-FRAMEWORK_6_0",
        "horde/mnemo": "dev-FRAMEWORK_6_0",
        "horde/memcache": "dev-FRAMEWORK_6_0",
        "horde/activesync": "dev-FRAMEWORK_6_0"
    },

 From there, I run:    composer update horde/* -W

I'm going to be "out of pocket" for a few days after this. Hopefully  
you can get it working. I have a bug in Turba if you have a photo  
installed for a contact. I'll see where/how I'm supposed to submit a  
bug for that.

brent



Links:
------
[1] http://rpc.php/%241
[2] http://www.example.com/horde/web


More information about the horde mailing list