<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>scripts/setup.php generates wrong database schema</title> 
  <pubDate>Fri, 10 Apr 2026 02:21:32 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/7433</link> 
  <atom:link rel="self" type="application/rss+xml" title="scripts/setup.php generates wrong database schema" href="https://bugs.horde.org/ticket/7433/rss" /> 
  <description>scripts/setup.php generates wrong database schema</description> 
 
   
   
  <item> 
   <title>The script at scripts/setup.php in Horde Groupware Webmail E</title> 
   <description>The script at scripts/setup.php in Horde Groupware Webmail Edition 1.2 generates a wrong database schema. 

After making a fresh install for example my horde_locks has no attribute lock_owner and lock_scope 



This produces this error: Oct 05 17:40:12 HORDE [error] [horde] DB Error: no such field: SELECT lock_id, lock_owner, lock_scope, lock_principal, lock_origin_timestamp, lock_update_tim

estamp, lock_expiry_timestamp, lock_type FROM horde_locks WHERE lock_expiry_timestamp &gt;= 1223221212 AND lock_principal = &#039;/nag/hauke@hauke-m.de/hauke@hauke-m

.de.ics&#039; AND lock_scope = &#039;webdav&#039; [nativecode=1054 ** Unknown column &#039;lock_owner&#039; in &#039;field list&#039;] [pid 21056 on line 536 of &quot;/var/www/horde/web/lib/Horde/R

PC/webdav.php&quot;]



After installing the tables from groupware.mysql.sql it works.

This is not the only difference between groupware.mysql.sql and the installed tables.</description> 
   <pubDate>Sun, 05 Oct 2008 16:34:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7433#t49379</link> 
  </item> 
   
  <item> 
   <title>Did you get an error when installing the database through se</title> 
   <description>Did you get an error when installing the database through setup.php? All fields mentioned in the error message exist in scripts/sql/create.xml.</description> 
   <pubDate>Tue, 07 Oct 2008 13:37:02 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7433#t49468</link> 
  </item> 
   
  <item> 
   <title>&gt; Did you get an error when installing the database through </title> 
   <description>&gt; Did you get an error when installing the database through setup.php? 

&gt; All fields mentioned in the error message exist in 

&gt; scripts/sql/create.xml.



Posting here some additional information. I have the same issue with my Horde server (missing fields lock_owner and lock_scope in horde_locks table, I didn&#039;t check the other tables).



I retry an install from scratch to answer to your question. Apache server (2.2.3 on a Debian Etch), MySQL server (5.0.32) and PHP (5.2.0). Here is a summary:

 - Download horde-webmail-1.2.tar.gz

 - Extract in DocumentRoot

 - chown -R www-data: .

 - cd script; ./setup.php

     (1) Configure database settings

       answer questions, then during step &#039;Writing main configuration file&#039;, this error occurs 10 times:

           Notice: Undefined index:  secret_key in /nfswebuapv-test/horde-test.univ-avignon.fr/www/lib/Horde.php on line 359

     Continuing with (2) Create database or tables

       None error occurs, except a warning because I&#039;ve manually created the database ([  WARN  ] Database horde_test3 already exists, skipping.)

 - Finally, I&#039;ve checked horde_locks :

mysql&gt; desc horde_locks;

+-----------------------+--------------+------+-----+---------+-------+

| Field                 | Type         | Null | Key | Default | Extra |

+-----------------------+--------------+------+-----+---------+-------+

| lock_id               | varchar(36)  | NO   | PRI |         |       | 

| lock_principal        | varchar(255) | NO   |     |         |       | 

| lock_origin_timestamp | int(11)      | NO   |     | 0       |       | 

| lock_update_timestamp | int(11)      | NO   |     | 0       |       | 

| lock_expiry_timestamp | int(11)      | NO   |     | 0       |       | 

| lock_type             | int(11)      | NO   |     | 0       |       | 

+-----------------------+--------------+------+-----+---------+-------+

6 rows in set (0.00 sec)



Still missing two fields.</description> 
   <pubDate>Thu, 23 Oct 2008 17:15:26 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7433#t49909</link> 
  </item> 
   
  <item> 
   <title>This is weird.</title> 
   <description>This is weird.</description> 
   <pubDate>Thu, 23 Oct 2008 17:40:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7433#t49910</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in CVS for this ticket:

http://cvs.h</title> 
   <description>Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/horde/scripts/sql/create.xml?r1=1.25&amp;r2=1.26&amp;ty=u</description> 
   <pubDate>Fri, 24 Oct 2008 22:31:32 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7433#t49997</link> 
  </item> 
   
  <item> 
   <title>There was a typo in the schema file, fixed for 1.2.1.</title> 
   <description>There was a typo in the schema file, fixed for 1.2.1.</description> 
   <pubDate>Fri, 24 Oct 2008 22:33:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7433#t49998</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
