[horde] horde-db-migrate error

Michael Rubinsky mrubinsk at horde.org
Fri Apr 8 22:01:41 UTC 2011


Quoting Simon Brereton <simon.brereton at dada.net>:

> Hi
>
> So, I installed the final H4 as a fresh install and set it up from  
> scratch with a new (empty) db.
>
> Then I changed the horde configuration to point to the old DB -  
> which worked but complained about the schema being out of date.
>
> So, then I ran update DB schema from the configuration panel - which  
> worked fine for all apps except Kronolith.
>
>> From an earlier thread, I then attempted to run:
>
> /usr/share/horde4# /usr/bin/horde-db-migrate
> [  INFO  ] Migrating DB up.
> [  INFO  ] Current imp schema version: 2
> [  INFO  ] Ending imp schema version: 2
> [  INFO  ] Current ingo schema version: 5
> [  INFO  ] Ending ingo schema version: 5
> [  INFO  ] Current turba schema version: 5
> [  INFO  ] Ending turba schema version: 5
> [  INFO  ] Current kronolith schema version: 17
> Migrating to KronolithUpgradeCategoriesToTags (18)
> == 18 KronolithUpgradeCategoriesToTags: migrating  
> =============================
> == 18 KronolithUpgradeCategoriesToTags: Migrating event categories  
> to tags. ===
> -- select(SELECT event_uid, event_category, event_creator_id,  
> calendar_id FROM kronolith_events)
>    -> 0.0003s
> -- getOption(charset)
>    -> 0.0000s
> == 18 KronolithUpgradeCategoriesToTags: Unable to find Share:  
> user at mydomain.com Skipping.
> PHP Fatal error:  Call to a member function get() on a non-object in  
> /usr/share/horde4/kronolith/migration/18_kronolith_upgrade_categoriestotags.php on line  
> 53
>
> And in the configuration panel kronolith is still complaining that  
> the DB schema is out of date.
>
> My horde3 db had 83 tables.  My empty horde4 has 92, my new horde3  
> table has 128 tables (but some of these are WHUPS and Ansel, etc  
> that haven't come over yet).
>
> Attempting to run Update all DB Schemas from the panel gives me a  
> white screen.
>
> The log says only:
>
> 2011-04-08T22:34:59+01:00 ERR: HORDE [horde] Share name  
> user at mydomain.com not found [pid 18239 on line 179 of  
> "/usr/share/php/Horde/Share/Sql.php"]
> 2011-04-08T22:34:59+01:00 NOTICE: HORDE [horde] PHP ERROR: Undefined  
> variable: cal [pid 18239 on line 53 of  
> "/usr/share/horde4/kronolith/migration/18_kronolith_upgrade_categoriestotags.php"]
>
> Any  ideas?

There are two issues here:

The first issue is that for some reason the share that represents a  
calendar that a particular event belongs to is not being found.

The second issue is the real showstopper as far as finishing the  
migrations is concerned. Code that should only be executed when the  
share is found *is* being run when the share is not found.

The second issue has already been fixed in the code - as I responded  
in the previous thread that you referenced. I also provided a link  
that shows the changes.

As to what is causing the share to not be found, it could be a few  
different things. The most likely scenerio is that it's a  
stale/orphaned entry in the database. If, after the fix is applied,  
you continue to get these errors for multiple shares, we can further  
track this down.

--mike

The Horde Project (www.horde.org)
mrubinsk at horde.org



More information about the horde mailing list