[horde] Cannot install Horde with composer on openSUSE 15.4

Brent impuser at bitrealm.com
Thu Feb 16 15:39:36 UTC 2023

  Quoting Admin Beckspaced <admin at beckspaced.com>:

> Am 05.02.2023 um 23:30 schrieb Ferdinand Gruber:
>> I've been using Horde for almost 20 years now. PHP8 was installed  
>> with the upgrade to Suse 15.4. Since upgrading to PHP8, Horde has  
>> stopped working.
>> Now I tried a new install of Horde with composer. I am sure that I  
>> did everything correctly according to the instructions on github. I  
>> also created a virtualHost for Horde using  
>> /srv/www/htdocs/horde/web as documentRoot
>> After successful installation I think, that something like an  
>> installation wizard should appear after calling the Horde site in  
>> the web-browser. But instead I am redirected to a login page, that  
>> of course does not exist.
>> You can examine this on my real site: https://horde.grubit.at
>> After this I tried to get Horde to work using an openSUSE VM. I  
>> have such a VirtualBox VM running on my home computer for test  
>> purposes. After having added some needed modules and other stuff I  
>> got apache2 to work on that VM. Additionally I had to set up the  
>> mysql server and to install composer on the VM.
>> On that VM there was never Horde installed or PEAR.
>> Now I could install Horde with composer and copied the sample  
>> config file to conf.php and called
>> cd /srv/www/htdocs/horde
>> composer horde-reconfigure
>> I opened the web browser in the VM and called http://localhost/horde/web
>> Now I expected the installation wizard or something similar. But  
>> instead of that I get redirected to this address:
>> http://localhost/horde/login.php
>> So the same thing happens as on my production server.
>> I'm sorry, I suspect a bug in Horde's PHP code that only appears in  
>> SUSE. How can I debug this?
> Hello Ferdinand & Brent,
> I was following your conversation in the list.
> I'm in a similar situation as I need to update my PHP version to 8.x
> I followed the instructions at https://github.com/horde/horde-deployment
> I encountered an issue with running composer as root.
> Do not run Composer as root/super user! See  
> https://getcomposer.org/root for details
> Continue as root/super user [yes]?
> If I just confirmed with yes and run composer the horde installation  
> was not working properly.
> Seems like some plugins were disabled as mentioned here:  
> https://getcomposer.org/doc/faqs/how-to-install-untrusted-packages-safely.md
> If I then instead do 'export COMPOSER_ALLOW_SUPERUSER=1' in the  
> shell  and then run composer install the horde installation was  
> properly installed.
> Pointing the document root to /web subdirectory on a sub domain gave  
> me access to configure horde.
> horde/imp
> @brent thanks a lot for the following command
> $ composer require horde/imp dev-FRAMEWORK_6_0
> The param 'dev-FRAMEWORK_6_0' after the package name seems to define  
> the branch I want to install?
> Is that correct?
> Still need to learn a bit more about composer :)
> Installing and configuring Horde IMP was also not a big deal and it  
> actually went pretty smooth.
> I also tried the install on my staging server with PHP 8.0.x and PHP 8.1.x
> Both PHP versions worked fine.
> horde/passwd
> horde/passwd module was giving an error because of the newer mariadb
> Feb 15 18:09:47 cx20 HORDE[6596]: [passwd] utf8 is not supported by  
> MySQL (big5, dec8, cp850, hp8, koi8r, latin1, latin2, swe7, ascii,  
> ujis, sjis, hebrew, tis620, euckr, koi8u, gb2312, greek, cp1250,  
> gbk, latin5, armscii8, utf8mb3, ucs2, cp866, keybcs2, macce,  
> macroman, cp852, latin7, utf8mb4, cp1251, utf16, utf16le, cp1256,  
> cp1257, utf32, binary, geostd8, cp932, eucjpms) [pid 6596 on line  
> 130 of  
> "/srv/ssl/horde-test/horde/vendor/horde/passwd/lib/Factory/Driver.php"]
> adding charset utf8mb4 in the backend driver solved this issue
>     'params' => array(
>         'phptype' => 'mysqli',
>         'charset' => 'utf8mb4',
>         ....
> $ composer require horde/passwd dev-FRAMEWORK_6_0
> running that command also automatically installed the memcache from  
> pecl.php.net
> pecl.php.net Available Upgrades (stable):
> =========================================
> Channel      Package  Local          Remote       Size
> pecl.php.net memcache 2.2.7 (stable) 8.0 (stable) 77kB
> From horde install instructions I remember the -B option
> pear install -o -B horde/passwd
> which would then skip the installation of the binary PECL package  
> and only install required dependencies instead of all optional  
> dependencies
> Is there also an option with composer to skip installtion of the  
> binary PECL package?
> @ferdinand & @brent
> thanks a lot for your conversation.
> you both gave me the proper hints and motivation to start working on  
> a new horde install :)
> greetings
> Ralf

Ferdinand is sitll having some issues, we're chatting about their  
installation off of the list so as to not clutter it up. I sent him a  
VM of my installation to compare with their installation on Ubuntu.

For horde to install, it must have write access to the install  
directory to be able to create the symlinks. You CAN just run it as  
root, though it isn't recommended. No need to set the flag, just run  
it as root and say "y" if you want to do it that way.  I just set my  
base directory to be owned by a particular user that has write access  
to everything below it and then run composer as that update. The web  
user needs write access to the various config files to make updates  
via the UI.

Yes, the "dev-FRAMEWORK_6_0" tells composer which branch to use for  
installation. Yeah, mariadb nuked the utf-8 as they don't properly  
support the entire utf-8 character set. Best to convert to utf8mb4,  
which sounds like you've done.

Glad you're up and operational! I would not install the horde/passwd  
via pear. This would install the OLD version that is not going to be  
compatible with php8 and the dev version (alpha, actually) version of  
Horde that you're using. I don't personally use the passwd module, but  
I just installed it and it did NOT install memcache. So, I'm unclear  
where/how you would ge tthat. I don't have the "pecl" binary installed  
on my Ubuntu, but I DO have it on my Fedora installs. For Fedora, it  
gets installed with the php-pecl-memcache package. Ubuntu doesn't  
appear to have this package.

After installing horde/passwd, there are 5 packages it is suggesting  
to add, but they aren't required. None of mine were memcached, so I  
don't have the same experience as you did.

The passwd package (to my knowledge) doesn't require memcache. You can  
see if there are any packages that are suggested by doing:

$ composer suggest

My Ubuntu (with horde/passwd added) does not suggest memcached. My  
test.php on Ubuntu claims that memcached PECL support is not enabled.


More information about the horde mailing list