METAR/TAF support in Horde_Service_Weather

By Michael Rubinsky (14.8.2016, 06:44 UTC)
Support for METAR/TAF data in Horde's weather library to replace the deprecated PEAR_Services_Weather package.

Horde_Rdo Many to Many relations and Horde DB Migrator

By Ralf Lang (7.12.2015, 20:27 UTC)

Many to Many relations btween to object types or table rows are usually saved to a database using a third table.

For example, if every server can have multiple services and each service can run on multiple computers, we need a third table to store the relations:

server table:
server_id | server_name
        1 |
        2 |
service table:
service_id | service_name
         1 | tomcat
         2 | dovecot
relation table:
service_id | server_id
         1 | 1
         2 | 2
         2 | 1

Horde’s ORM Layer Horde_Rdo supports creating, checking and changing such relations but it’s not very prominently documented.

Let’s look at an example.

First, we need to create the database schema. Note that the relations table has no autoincrement key, only the two columns used for lookup

/usr/share/php5/PEAR/www/horde/hvview/migration # cat 1_hvview_base_tables.php
* Create Hvview base tables.
* Copyright 2015-2015 B1 Systems GmbH (
* See the enclosed file COPYING for license information (GPL). If you
* did not receive this file, see
* @author Ralf Lang
* @package Hvview
class HvviewBaseTables extends Horde_Db_Migration_Base
* Upgrade
public function up()

$t = $this->createTable('hvview_technical_landscapes', array('autoincrementKey' => 'landscape_id'));
$t->column('landscape_name', 'string', array('limit' => 255, 'null' => false));
$t->column('period_id', 'integer', array('limit' => 11, 'null' => false));

$t = $this->createTable('hvview_resource_pools', array('autoincrementKey' => 'resource_pool_id'));
$t->column('pool_name', 'string', array('limit' => 255, 'null' => false));
$t->column('landscape_id', 'integer', array('limit' => 11, 'null' => false));
$t->column('period_id', 'integer', array('limit' => 11, 'null' => false));

$t = $this->createTable('hvview_hardware_pools', array('autoincrementKey' => 'hardware_pool_id'));
$t->column('pool_name', 'string', array('limit' => 255, 'null' => false));
$t->column('landscape_id', 'integer', array('limit' => 11, 'null' => false)); /* possibly redundant, but may speed up things */
$t->column('period_id', 'integer', array('limit' => 11, 'null' => false));

/*Relations table*/
$t = $this->createTable('hvview_rp_hwps', array('autoincrementKey' => false));
$t->column('resource_pool_id', 'integer', array('limit' => 11, 'null' => false));
$t->column('hardware_pool_id', 'integer', array('limit' => 11, 'null' => false));

$t = $this->createTable('hvview_periods', array('autoincrementKey' => 'period_id'));
$t->column('period_ts', 'integer', array('limit' => 11, 'null' => false));

/* We collapse hypervisor and blade server objects into one for now - let`s see if this scales well */
$t = $this->createTable('hvview_servers', array('autoincrementKey' => 'server_id'));
$t->column('period_id', 'integer', array('limit' => 11, 'null' => false));
$t->column('hardware_pool_id', 'integer', array('limit' => 11, 'null' => false));
$t->column('hostname', 'string', array('limit' => 100, 'null' => false));
$t->column('state', 'string', array('limit' => 20, 'null' => true));
$t->column('os_release', 'string', array('limit' => 20, 'null' => true));
$t->column('comment', 'string', array('limit' => 255, 'null' => true));
$t->column('hv_free_vcpu', 'integer', array('limit' => 11, 'null' => true));
$t->column('hv_free_memory', 'integer', array('limit' => 11, 'null' => true));
$t->column('hv_free_disk', 'integer', array('limit' => 11, 'null' => true));
$t->column('hv_total_vcpu', 'integer', array('limit' => 11, 'null' => true));
$t->column('hv_total_memory', 'integer', array('limit' => 11, 'null' => true));
$t->column('hv_excluded', 'integer', array('limit' => 1, 'null' => true));
$t->column('hv_vm_count', 'integer', array('limit' => 3, 'null' => true));

// Indices not before we have an idea which of them we need most
// $this->addIndex('hvview_items', array('item_owner'));


* Downgrade
public function down()

Truncated by Planet Horde, read more at the original (another 2955 bytes)

Horde im Tatort

By Jan Schneider (24.11.2014, 18:46 UTC)
Horde Groupware played a role in Germany's number one crime series on Sunday evening.

Horde Recipe: Storing the last login language

By Ralf Lang (10.1.2014, 12:21 UTC)

A simple Horde Hook to store the last chosen login value in a user preference.
You can use this for example to determine in which language automatic messages by cron job or daemon should be sent.

// // APPLICATION AUTHENTICATED HOOK: See above for format.
public function appauthenticated()
global $language;
global $prefs;
if ($language) {
$prefs->setValue('language', $language);


// // Code to run when an application is first authenticated

If you want, you can modify it so it won’t overrule manual settings in the prefs UI:

if ($language && empty($prefs->getValue('language')) {
$prefs->setValue('language', $language);


Horde starts Crowdfunding for IMP Multi-Account feature: Funded after a week

By Ralf Lang (9.8.2013, 11:29 UTC)

Michael Slusarz of Horde LLC started a crowdfunding experiment: He offered a 3000 $ project at to back up development of the IMP multi-account feature. Multi-Account support allows users to manage multiple mail boxes within one horde account. The feature is meant to replace Horde 3’s fetchmail feature which has not been ported for Horde 4 and 5 because technically, it’s not desirable anymore.

Michael Slusarz: The old fetchmail functionality is not coming back. It simply doesn’t work coherently/properly in a PHP environment with limited process times (and is non-threaded).
The replacement MUST be the ability to access multiple accounts within a single session. But this is not a trivial change

After Slusarz started the fundraising campaign, long-time supporters and users of horde contributed funds.

Currently, after three days, more that 80% of funding have been raised. About 500 US $ are still missing. The change is not trivial and probably going into IMP 6.2 for Horde 5.

As mentioned previously, this is a multi-week project, at least from a project planning perspective. And that doesn’t include the bug-fixing that is likely to be significant, given the fact that this is 1) an invasive UI change and 2) is involving connections to remote servers.

That being said – this is something I personally would *really* like to see in IMP also, so I am willing to provide a discount and prioritize this over some other activities I am currently involved in.
* This won’t be available for IMP 6.1. This will go into 6.2, at the earliest.

The Horde IMP Webmailer is among the most popular webmail applications in the world. It is shipped with most widespread linux distributions like openSUSE and Debian and has been used to drive webmail and groupware applications for large-scale userbases all over the world.

Currently, Horde 5 / IMP 6 is integrated into the cpanel administration product.

Update: After roughly a week, by 2013-08-14 the crowdfunding tilted: 3090 USD had been contributed.
I proudly get to make the announcement that the IMP Multiple Accounts
feature has been fully funded, as we reached the funding goal on
Crowdtilt this afternoon:

I wanted to take the opportunity to thank all of the contributors:

– Simon Wilson
– Luis Felipe Marzagao
– Ralf Lang
– srl
– Elbia Hosting
– Thomas Jarosch
– Andrew Dorman
– Henning Retzgen
– Michael Cramer
– Harvey Braun
– SAPO/Portugal Telecom
– Matthias Bitterlich
– Allan Girvan
– Bill Abrams
– Markus Wolff
– CAIXALMASSORA (Jose Guzman Feliu Vivas)
– Wolf Maschinenbau AG (Samuel Wolf)

It feels good to put a definite milestone into the enhancement ticket:

Should be able to start on this soon… hopefully tomorrow. Still
undecided on which branch I’m going to do development in but I will
post information to the dev@ list once I decide. Those that
contributed may get status updates.

Once again, thanks to everyone for supporting the Horde Project. Not
only was this an interesting experience from my standpoint (hopefully
others as well), but now we will soon get a feature that is obviously
desired by a large portion of the user base.


Horde Configuration: How to move passwd app into settings menu

By Ralf Lang (30.7.2013, 19:38 UTC)

The passwd app is a password management/changing utility for Horde which normally lives in a menu „my account“ in the toolbar.

While it has been released and is in production use at many sites, it is also under development to expand and improve the module.

Passwd provides fairly complete support for changing passwords via Poppassd, LDAP, Unix expect scripts, SMB/CIFS (under unix), Kolab, ADSI, Pine, Serv-U FTP, VMailMgr, vpopmail, SQL passwords and other more complicated setups.For a certain horde 5 installation, I needed to move the passwd app under the gearwheel/settings menu and out of the toolbar. After setting up passwd to work correctly, I added only one line to the registry.local.php file:

$this->applications['passwd']['menu_parent'] = 'settings';

Everything you put into the menu labelled „settings“ automatically appears in the gearwheel menu.

They’re taking the Horde to Debian, to Debian!

By Ralf Lang (29.12.2012, 16:01 UTC)

Now that Horde Groupware 5 has been released as stable software, a lot of users noticed the shortcomings of the PEAR packaging systems. It does not provide an easy and smooth way to upgrade Horde 4 to the latest bugfix version anymore. If you run Horde 4 apps that have not been ported for Horde 5 yet, you need to be very cautious which pear commands you run. A simple pear upgrade -c horde would break your existing installation because it would upgrade everything to the most recent major version. This is not desirable for production systems. Distribution packaging is the solution to this. Receive only compatible upgrades until you decide to do a major upgrade.

Distribution packages of Horde 5 are available for openSUSE and SUSE Linux Enterprise Server from the isv:B1-Systems:Horde5:rolling project.

These packages include development snapshots of unreleased applications like Passwd for Horde 5. They have been modified to fit into the distribution specific standard directories, install regular jobs the distribution way etc. For example, the distribution apps don’t have separate .htaccess files but provide a ready-to-run apache2 vhost config.

Under debian however, nobody stepped up to help the main debian horde packager, Mathieu Parent, to finish the Horde 5 packages in time. This means, the next stable Debian release will probably not include Horde 5.

I have talked to Mathieu and built a patch for the Open Build Service which facilitates PEAR packaging for debian targets.

You can see the progress of debian packaging by adding the Debian repository of the project to your /etc/apt/sources.list file

cd /root/
echo "deb ./" >> /etc/apt/sources.list
apt-key add Release.key
apt-get update

As of today, the repository only contains php-horde-autoloader but it I aim to fill it with all ~ 100 Horde pear packages (minus the bundles).

If you need business critical, supported Horde 4 or Horde 5 packages for openSUSE/SLES, Redhat/CentOS, Debian, Ubuntu or special architectures like ARM or Itanium, don’t wait for community action but ask for a commercial solution.

Horde 5 means End of Life for Horde 3 – And now let’s see

By Ralf Lang (27.11.2012, 13:21 UTC)
-------- Original-Nachricht --------
Betreff: [announce] End Of Life for Horde 3
Datum: Tue, 27 Nov 2012 13:21:17 +0100
Von: Jan Schneider <>
Antwort an:

The Horde Team is announcing the End Of Life (EOL) for the Horde 3
release series.

With the final release of Horde 5 the state of the following release
series is updated:

Horde 3: EOL
Horde 4: Security Fixes
Horde 5: Bug Fixes

Please see for details
about the Horde release cycle and for the affected applications.

Horde 3 had been a huge milestone in Horde's history and has served us
well for 8 long years. We really hope you enjoyed it too. We know it's
still in use in many, many places, and we like to encourage everyone
to upgrade to the latest version which is such a huge improvement over
the now outdated Horde 3 line.

Thank you, Horde 3, and thank you, everyone who made it such a great

I do agree with Jan that Horde 3 had a great time and anybody still using it should migrate to Horde 4/5 soon.

Modular git with "git subtree"

By Gunnar Wrobel (7.8.2012, 10:00 UTC)

One thing I always disliked about the way we organized our Horde repository was the fact that we have all library modules and applications lumped together in a single git repository. Of course there are some good reasons for that type of monolithic repo. But for someone just interested in our (really powerful) IMAP library this is a drawback: The library is hidden somewhere between the other libraries and if you want to work on it you will nevertheless have to clone the whole repository. And there are other situations in which small, module specific repositories would make sense. So far I wasn't aware of a solution that would allow for a reasonable compromise.

Originally I only knew that git submodule would allow including additional git repositories into a master repository. This approach has some drawbacks though. We could construct the current horde repository out of a bunch of submodules. But the work flow within this master repository would be significantly more cumbersome as git submodule interferes with the default way of working with git.

git subtree to the rescue!

git subtree however seems to allow for the perfect solution: Separate subrepositories can co-exist with the monolithic master repository. And any commits to either of them can be exchanged between them. The stream of commits to the monolithic master can even be transmitted automatically to the splitted repositories. None of these steps seem to introduce any additional overhead to any of these repositories.

Installing "git subtree"

The subtree command has been added to the git-1.7.11 release. But as many distributions do not yet offer this variant you can install the tool in a more hackish way if desired:

cd /usr/lib/git-core/
mv git-subtree
chmod 755 git-subtree

Replacing a "submodule" with a "subtree"

A while ago I pulled the Jenkins installation procedures into our horde-support repository using git submodule. In order to give git subtree a first test run I replaced the Jenkins submodule by the subtree approach. The first step had to be the removal of the old submodule:

git rm .gitmodules ci/jenkins
git commit -m "Remove the jenkins installation procedures as a submodule. Prepares for replacement by 'git subtree'"

Now I imported the repository previously registered via git submodule using git subtree:

git subtree add --prefix=ci/jenkins --squash master

This pulled the external repository into the current horde-support repository at prefix "ci/jenkins" and squashed all commits of the imported repository into a single commit. The imported code is now an equivalent citizen to the rest of the code in the repository - none of the standard git work flows are affected in any way.

Of course the interesting question is whether updates to this imported code can be merged back into the original repository. I commited a small change within the imported code:

git commit -m "Update to jenkins-1.475" ci/jenkins/

This change can indeed now be splitted into the subtree again and exported to the original archive:

git subtree split --prefix=ci/jenkins --annotate="(horde-support) " d73edc4878c8.. --branch ci-jenkins

What happens here is that git subtree splits the path specified with the prefix option into a separate branch named ci-jenkins. It will prefix any commit transported into this branch with (horde-support) to indicate the origin of the commit. Usually the branch range given here (d73edc4878c8..) is unnecessary for the operation. But the code within ci/jenkins had been included as submodule before commit d73edc4878c8. This part of the history should not be imported into the splitted branch.

After the splitting operation created the new ci-jenkins branch in my repository it should be equivalent to our original, imported repository. Thus I was able to push back to it:

git push ci-jenkins:master

Using "git subtree" for the horde repository

Can the subtree approach be used to have both a monolithic horde repository as well as the small modular repositories at the same time? This would be the best of both worlds: While we develop in the monolithic horde repositories we allow other developers to also watch and patch single modules. If the commits from the monolithic repo can be transferred to the modular repos on a regular basis while we can also import patches the other way around without blowing up any of the associated git repos: I'd be re

Truncated by Planet Horde, read more at the original (another 3911 bytes)

Horde 5 enters release cycle – First Alpha of Sesha Inventory App available

By Ralf Lang (10.7.2012, 15:20 UTC)

All’s well that ends well. During the last few days, the first alpha releases of the Horde Framework and some of its core apps hit the announcement list. Horde 5 sports a completely revamped user interface which allows a much tighter integration of the portal dashboard, ajax mode applications like the IMP Webmailer or traditional mode applications (whups ticketing etc).

Horde 5 has a completely renewed user interface (Image shows the IMP 6 webmailer)

While IMP, turba and the Ingo Mailfilter are already available as alpha packages, the calendar (kronolith) is not yet done.

However, today Horde release the first alpha version of the sesha inventory app. I have been working on sesha and related packages since horde 4, but things dragged on.

Sesha allows to organize any kind of items in a searchable inventory. First you have to define properties like age, weight, length or location of an item.

A defined group of properties makes up a category, something like an inventory type: Books, DVDs, network interfaces or computer monitors all have very different sets of properties. With sesha, there is no limit on the things you can put into your catalog. Just create categories of properties and finally add stock.

Sesha has been released under the GNU General Public License and may be used free of charge.