<?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>upgrade option in setup.php fails</title> 
  <pubDate>Fri, 10 Apr 2026 15:00:15 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/7223</link> 
  <atom:link rel="self" type="application/rss+xml" title="upgrade option in setup.php fails" href="https://bugs.horde.org/ticket/7223/rss" /> 
  <description>upgrade option in setup.php fails</description> 
 
   
   
  <item> 
   <title>Several problems in upgrade scripts setup.php for webmail 1.</title> 
   <description>Several problems in upgrade scripts setup.php for webmail 1.1.2



1. when run from commandline: 

 putenv fails for &#039;HORDE_DB_USER&#039; and &#039;HORDE_DB_PASS&#039;

 some upgrade scripts try to run /var/www/bin/php or /usr/local/bin/php/bin



remedy:

- header in setup.php #!/usr/bin/php -n -q -d safe_mode_allowed_env_vars=HORDE_

- change all paths to /usr/bin/php in upgrade scripts

 

2. errors in php.log:

[19-Aug-2008 23:56:18] PHP Fatal error:  Call to undefined method MDB2_Error::execute() in /home/httpd/webmail/horde/kronolith/scripts/upgrades/convert_datatree_shares_to_sql.php on line 152



Net Result is that the upgrade process does not lead to a working installation



</description> 
   <pubDate>Wed, 20 Aug 2008 16:53:40 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7223#t48318</link> 
  </item> 
   
  <item> 
   <title>&gt; Several problems in upgrade scripts setup.php for webmail </title> 
   <description>&gt; Several problems in upgrade scripts setup.php for webmail 1.1.2

&gt;

&gt; 1. when run from commandline:

&gt;  putenv fails for &#039;HORDE_DB_USER&#039; and &#039;HORDE_DB_PASS&#039;



Why?



&gt;  some upgrade scripts try to run /var/www/bin/php or /usr/local/bin/php/bin



Which scripts? No script has those weird paths hardcoded.



&gt; remedy:

&gt; - header in setup.php #!/usr/bin/php -n -q -d 

&gt; safe_mode_allowed_env_vars=HORDE_



Ah, so you are running safe_mode?



&gt; - change all paths to /usr/bin/php in upgrade scripts

&gt;

&gt; 2. errors in php.log:

&gt; [19-Aug-2008 23:56:18] PHP Fatal error:  Call to undefined method 

&gt; MDB2_Error::execute() in 

&gt; /home/httpd/webmail/horde/kronolith/scripts/upgrades/convert_datatree_shares_to_sql.php on line 

&gt; 152

&gt;

&gt; Net Result is that the upgrade process does not lead to a working 

&gt; installation

&gt;

&gt;

</description> 
   <pubDate>Wed, 20 Aug 2008 17:18:16 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7223#t48322</link> 
  </item> 
   
  <item> 
   <title>Here&#039;s the detailed output when i try to avoid safe_mode usi</title> 
   <description>Here&#039;s the detailed output when i try to avoid safe_mode using the commandline

apparently php runs in safe mode on my distro (slackware) , regardless of the -n (no php.ini) option.

hence the -d safe_mode_allowed_env_vars=HORDE_





[root@mist webmail]# mv horde horde.org

[root@mist webmail]# mv horde-webmail-1.1.2 horde

[root@mist webmail]# cd horde

[root@mist horde]#

[root@mist horde]# php -n ./scripts/setup.php

Horde Groupware Webmail Edition Configuration Menu

    (0) Exit

    (1) Configure database settings

    (2) Create database or tables

    (3) Configure administrator settings

    (4) Update from an older Horde Groupware Webmail Edition version



Type your choice: 4



Specify the directory of the old Horde Groupware Webmail Edition version that you would like to update: ../horde.org



Copying old configuration files...

../horde.org/kronolith/config/menu.php -&gt; /home/httpd/webmail/horde/kronolith/config/menu.php

../horde.org/kronolith/config/prefs.php -&gt; /home/httpd/webmail/horde/kronolith/config/prefs.php

../horde.org/kronolith/config/keywords.php -&gt; /home/httpd/webmail/horde/kronolith/config/keywords.php

../horde.org/kronolith/config/conf.php -&gt; /home/httpd/webmail/horde/kronolith/config/conf.php

../horde.org/config/hooks.php -&gt; /home/httpd/webmail/horde/config/hooks.php

../horde.org/config/prefs.php -&gt; /home/httpd/webmail/horde/config/prefs.php

../horde.org/config/conf.php -&gt; /home/httpd/webmail/horde/config/conf.php

../horde.org/config/motd.php -&gt; /home/httpd/webmail/horde/config/motd.php

../horde.org/config/mime_drivers.php -&gt; /home/httpd/webmail/horde/config/mime_drivers.php

../horde.org/config/nls.php -&gt; /home/httpd/webmail/horde/config/nls.php

../horde.org/config/registry.php -&gt; /home/httpd/webmail/horde/config/registry.php

../horde.org/turba/config/menu.php -&gt; /home/httpd/webmail/horde/turba/config/menu.php

../horde.org/turba/config/attributes.php -&gt; /home/httpd/webmail/horde/turba/config/attributes.php

../horde.org/turba/config/prefs.php -&gt; /home/httpd/webmail/horde/turba/config/prefs.php

../horde.org/turba/config/conf.php -&gt; /home/httpd/webmail/horde/turba/config/conf.php

../horde.org/turba/config/mime_drivers.php -&gt; /home/httpd/webmail/horde/turba/config/mime_drivers.php

../horde.org/turba/config/sources.php -&gt; /home/httpd/webmail/horde/turba/config/sources.php

../horde.org/mnemo/config/prefs.php -&gt; /home/httpd/webmail/horde/mnemo/config/prefs.php

../horde.org/mnemo/config/conf.php -&gt; /home/httpd/webmail/horde/mnemo/config/conf.php

../horde.org/mimp/config/menu.php -&gt; /home/httpd/webmail/horde/mimp/config/menu.php

../horde.org/mimp/config/prefs.php -&gt; /home/httpd/webmail/horde/mimp/config/prefs.php

../horde.org/mimp/config/conf.php -&gt; /home/httpd/webmail/horde/mimp/config/conf.php

../horde.org/mimp/config/mime_drivers.php -&gt; /home/httpd/webmail/horde/mimp/config/mime_drivers.php

../horde.org/ingo/config/fields.php -&gt; /home/httpd/webmail/horde/ingo/config/fields.php

../horde.org/ingo/config/prefs.php -&gt; /home/httpd/webmail/horde/ingo/config/prefs.php

../horde.org/ingo/config/backends.php -&gt; /home/httpd/webmail/horde/ingo/config/backends.php

../horde.org/ingo/config/conf.php -&gt; /home/httpd/webmail/horde/ingo/config/conf.php

../horde.org/nag/config/menu.php -&gt; /home/httpd/webmail/horde/nag/config/menu.php

../horde.org/nag/config/prefs.php -&gt; /home/httpd/webmail/horde/nag/config/prefs.php

../horde.org/nag/config/conf.php -&gt; /home/httpd/webmail/horde/nag/config/conf.php

../horde.org/imp/config/menu.php -&gt; /home/httpd/webmail/horde/imp/config/menu.php

../horde.org/imp/config/prefs.php -&gt; /home/httpd/webmail/horde/imp/config/prefs.php

../horde.org/imp/config/servers.php -&gt; /home/httpd/webmail/horde/imp/config/servers.php

../horde.org/imp/config/conf.php -&gt; /home/httpd/webmail/horde/imp/config/conf.php

../horde.org/imp/config/motd.php -&gt; /home/httpd/webmail/horde/imp/config/motd.php

../horde.org/imp/config/mime_drivers.php -&gt; /home/httpd/webmail/horde/imp/config/mime_drivers.php

../horde.org/imp/config/header.php -&gt; /home/httpd/webmail/horde/imp/config/header.php



Patching configuration files...

imp/config/mime_drivers.php

imp/config/prefs.php

ingo/config/fields.php

ingo/config/prefs.php

kronolith/config/prefs.php

mnemo/config/prefs.php

nag/config/prefs.php

config/mime_drivers.php

config/nls.php

config/prefs.php

config/prefs.php

config/registry.php

config/registry.php

turba/config/attributes.php

turba/config/prefs.php

turba/config/prefs.php

turba/config/sources.php

Done creating configuration files.



Database superuser for updating the tables if necessary for your database system: hwmdbuser



Specify a password for the database user: *******



Warning: putenv(): Safe Mode warning: Cannot set environment variable &#039;HORDE_DB_USER&#039; - it&#039;s not in the allowed list in /home/httpd/webmail/horde/scripts/setup.php on line 420



Warning: putenv(): Safe Mode warning: Cannot set environment variable &#039;HORDE_DB_PASS&#039; - it&#039;s not in the allowed list in /home/httpd/webmail/horde/scripts/setup.php on line 421



Changing existing data after this point. Did you create backups of your old

data, and are you sure that you want to continue?

    (y) Yes

    (n) No



Type your choice: n



Horde Groupware Webmail Edition Configuration Menu

    (0) Exit

    (1) Configure database settings

    (2) Create database or tables

    (3) Configure administrator settings

    (4) Update from an older Horde Groupware Webmail Edition version



Type your choice: 0



Thank you for using Horde Groupware Webmail Edition!



------------------------

OK now the output when i allow the HORDE vars:





[root@mist horde]#

[root@mist horde]# php -n -d safe_mode_allowed_env_vars=HORDE_ ./scripts/setup.php

Horde Groupware Webmail Edition Configuration Menu

    (0) Exit

    (1) Configure database settings

    (2) Create database or tables

    (3) Configure administrator settings

    (4) Update from an older Horde Groupware Webmail Edition version



Type your choice: 4



Specify the directory of the old Horde Groupware Webmail Edition version that you would like to update: ../horde.org



Copying old configuration files...

../horde.org/kronolith/config/menu.php -&gt; /home/httpd/webmail/horde/kronolith/config/menu.php

../horde.org/kronolith/config/prefs.php -&gt; /home/httpd/webmail/horde/kronolith/config/prefs.php

../horde.org/kronolith/config/keywords.php -&gt; /home/httpd/webmail/horde/kronolith/config/keywords.php

../horde.org/kronolith/config/conf.php -&gt; /home/httpd/webmail/horde/kronolith/config/conf.php

../horde.org/config/hooks.php -&gt; /home/httpd/webmail/horde/config/hooks.php

../horde.org/config/prefs.php -&gt; /home/httpd/webmail/horde/config/prefs.php

../horde.org/config/conf.php -&gt; /home/httpd/webmail/horde/config/conf.php

../horde.org/config/motd.php -&gt; /home/httpd/webmail/horde/config/motd.php

../horde.org/config/mime_drivers.php -&gt; /home/httpd/webmail/horde/config/mime_drivers.php

../horde.org/config/nls.php -&gt; /home/httpd/webmail/horde/config/nls.php

../horde.org/config/registry.php -&gt; /home/httpd/webmail/horde/config/registry.php

../horde.org/turba/config/menu.php -&gt; /home/httpd/webmail/horde/turba/config/menu.php

../horde.org/turba/config/attributes.php -&gt; /home/httpd/webmail/horde/turba/config/attributes.php

../horde.org/turba/config/prefs.php -&gt; /home/httpd/webmail/horde/turba/config/prefs.php

../horde.org/turba/config/conf.php -&gt; /home/httpd/webmail/horde/turba/config/conf.php

../horde.org/turba/config/mime_drivers.php -&gt; /home/httpd/webmail/horde/turba/config/mime_drivers.php

../horde.org/turba/config/sources.php -&gt; /home/httpd/webmail/horde/turba/config/sources.php

../horde.org/mnemo/config/prefs.php -&gt; /home/httpd/webmail/horde/mnemo/config/prefs.php

../horde.org/mnemo/config/conf.php -&gt; /home/httpd/webmail/horde/mnemo/config/conf.php

../horde.org/mimp/config/menu.php -&gt; /home/httpd/webmail/horde/mimp/config/menu.php

../horde.org/mimp/config/prefs.php -&gt; /home/httpd/webmail/horde/mimp/config/prefs.php

../horde.org/mimp/config/conf.php -&gt; /home/httpd/webmail/horde/mimp/config/conf.php

../horde.org/mimp/config/mime_drivers.php -&gt; /home/httpd/webmail/horde/mimp/config/mime_drivers.php

../horde.org/ingo/config/fields.php -&gt; /home/httpd/webmail/horde/ingo/config/fields.php

../horde.org/ingo/config/prefs.php -&gt; /home/httpd/webmail/horde/ingo/config/prefs.php

../horde.org/ingo/config/backends.php -&gt; /home/httpd/webmail/horde/ingo/config/backends.php

../horde.org/ingo/config/conf.php -&gt; /home/httpd/webmail/horde/ingo/config/conf.php

../horde.org/nag/config/menu.php -&gt; /home/httpd/webmail/horde/nag/config/menu.php

../horde.org/nag/config/prefs.php -&gt; /home/httpd/webmail/horde/nag/config/prefs.php

../horde.org/nag/config/conf.php -&gt; /home/httpd/webmail/horde/nag/config/conf.php

../horde.org/imp/config/menu.php -&gt; /home/httpd/webmail/horde/imp/config/menu.php

../horde.org/imp/config/prefs.php -&gt; /home/httpd/webmail/horde/imp/config/prefs.php

../horde.org/imp/config/servers.php -&gt; /home/httpd/webmail/horde/imp/config/servers.php

../horde.org/imp/config/conf.php -&gt; /home/httpd/webmail/horde/imp/config/conf.php

../horde.org/imp/config/motd.php -&gt; /home/httpd/webmail/horde/imp/config/motd.php

../horde.org/imp/config/mime_drivers.php -&gt; /home/httpd/webmail/horde/imp/config/mime_drivers.php

../horde.org/imp/config/header.php -&gt; /home/httpd/webmail/horde/imp/config/header.php



Patching configuration files...

imp/config/mime_drivers.php

imp/config/prefs.php

ingo/config/fields.php

ingo/config/prefs.php

kronolith/config/prefs.php

mnemo/config/prefs.php

nag/config/prefs.php

config/mime_drivers.php

config/nls.php

config/prefs.php

config/prefs.php

config/registry.php

config/registry.php

turba/config/attributes.php

turba/config/prefs.php

turba/config/prefs.php

turba/config/sources.php

Done creating configuration files.



Database superuser for updating the tables if necessary for your database system: hwmdbuser



Specify a password for the database user: *******



Changing existing data after this point. Did you create backups of your old

data, and are you sure that you want to continue?

    (y) Yes

    (n) No



Type your choice: y



Running pre-update scripts...

/home/httpd/webmail/horde/turba/scripts/upgrades/2.1_to_2.2_sql_schema.php

sh: /usr/local/php/bin/php: No such file or directory



Horde Groupware Webmail Edition Configuration Menu

    (0) Exit

    (1) Configure database settings

    (2) Create database or tables

    (3) Configure administrator settings

    (4) Update from an older Horde Groupware Webmail Edition version



Type your choice:



----



I found just one script with this path hardcoded:



head -2 ./kronolith/scripts/migrate_to_sql_driver.php

#!/usr/local/bin/php

&lt;?php







Hope this helps



</description> 
   <pubDate>Wed, 20 Aug 2008 19:13:27 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7223#t48332</link> 
  </item> 
   
  <item> 
   <title>Oops feel like a complete idiot now about the safe mode...

</title> 
   <description>Oops feel like a complete idiot now about the safe mode...



apparently the /usr/local/php/bin path is the safe_mode_exec_dir which is compiled-in in php for my slackware distro.

And the simple php -n -d safe_mode=Off  scripts/setup.php does the trick of course.



Sorry to have bothered you.



</description> 
   <pubDate>Wed, 20 Aug 2008 19:30:20 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/7223#t48334</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
