<?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>global $conf empty</title> 
  <pubDate>Thu, 09 Apr 2026 19:39:43 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/6299</link> 
  <atom:link rel="self" type="application/rss+xml" title="global $conf empty" href="https://bugs.horde.org/ticket/6299/rss" /> 
  <description>global $conf empty</description> 
 
   
   
  <item> 
   <title>$conf seems to be empty when Horde::getTempDir() is executed</title> 
   <description>$conf seems to be empty when Horde::getTempDir() is executed, except while accessing the Administration/Setup, in that case it actually contains the variables from conf.php. In all other cases Util::getTempDir() is executed because of $conf being empty.



i noticed this when Horde cache files were being written in the php upload_tmp_dir, while they should be in $conf[&#039;tmpdir&#039;]. Util::getTempDir()  falls back to php&#039;s upload_tmp_dir whenever it can&#039;t find $config[&#039;tmpdir&#039;], therefor the cache files are in the wrong directory. 



i changed Horde::getTempDir() to print_r $conf  whenever it&#039;s being called, and so far I only saw output generated when accessing the Administration/Setup and also when attaching a file to a message in IMP. in this case the the file also resides in $config[&#039;tmpdir&#039;] just untill the message has been sent (which is correct behavior imho).



I&#039;m using the latest RC2 version of Horde/IMP</description> 
   <pubDate>Wed, 20 Feb 2008 13:45:51 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6299#t42655</link> 
  </item> 
   
  <item> 
   <title>yea, I just uncovered this one the other day as well.  The i</title> 
   <description>yea, I just uncovered this one the other day as well.  The issue is that when an application is loaded in the registry ($registry-pushApp() -&gt; Horde::loadConfiguration() etc...) conf.php hasn&#039;t finished loading (and is not yet in the GLOBAL scope) when Horde::getTempDir() is called from conf.php.  



We&#039;re looking at possible fixes, but for now, your going to need to hard code your tmp path there if you want it something other than your system default.

</description> 
   <pubDate>Wed, 20 Feb 2008 18:29:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6299#t42671</link> 
  </item> 
   
  <item> 
   <title>&gt; yea, I just uncovered this one the other day as well.  The</title> 
   <description>&gt; yea, I just uncovered this one the other day as well.  The issue is 

&gt; that when an application is loaded in the registry 

&gt; ($registry-pushApp() -&gt; Horde::loadConfiguration() etc...) conf.php 

&gt; hasn&#039;t finished loading (and is not yet in the GLOBAL scope) when 

&gt; Horde::getTempDir() is called from conf.php.



So it works in apps, but not in Horde, right?</description> 
   <pubDate>Mon, 25 Feb 2008 04:36:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6299#t42941</link> 
  </item> 
   
  <item> 
   <title>

&gt;&gt; hasn&#039;t finished loading (and is not yet in the GLOBAL s</title> 
   <description>

&gt;&gt; hasn&#039;t finished loading (and is not yet in the GLOBAL scope) when

&gt;&gt; Horde::getTempDir() is called from conf.php.

&gt;

&gt; So it works in apps, but not in Horde, right?



as far as i am concerned it doesn&#039;t work anywhere besides Horde&#039;s Adminitration/Setup and when attaching an e-mail in IMP. but even when you have accessed Setup or Compose+Attach, the $conf variable is empty again afterwards. so i&#039;m afraid the answer would be no, the problem persists through all applications.

</description> 
   <pubDate>Mon, 25 Feb 2008 11:32:09 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6299#t42953</link> 
  </item> 
   
  <item> 
   <title>&gt; So it works in apps, but not in Horde, right?



The issue</title> 
   <description>&gt; So it works in apps, but not in Horde, right?



The issue I&#039;m referring to occurs in any application context.  To see what I mean, set $conf[&#039;tmpdir&#039;] to something other than your system default.  Set $conf[cache][params][dir] to Horde::getTempDir() (while using file based cache).



Then from admin-&gt;php shell try the following



echo $conf[&#039;tmpdir&#039;]; // This will show the correct value that you set.

echo $conf[&#039;cache&#039;][&#039;params&#039;][&#039;dir&#039;]; // This will incorrectly show the system&#039;s default tmp directory.



echo Horde::getTempDir(); // This will correctly show the conigured horde tmpdir default, since it&#039;s being executed after the app has been loaded in the registry.

</description> 
   <pubDate>Mon, 25 Feb 2008 16:29:27 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6299#t42966</link> 
  </item> 
   
  <item> 
   <title>So, what do we do? Not defaulting to Horde::getTempDir()? Sh</title> 
   <description>So, what do we do? Not defaulting to Horde::getTempDir()? Shouldn&#039;t even be a PHP expression anymore then.</description> 
   <pubDate>Mon, 03 Mar 2008 18:24:30 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6299#t43351</link> 
  </item> 
   
  <item> 
   <title>That seems like the only reasonable fix to me.</title> 
   <description>That seems like the only reasonable fix to me.</description> 
   <pubDate>Mon, 03 Mar 2008 18:42:34 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6299#t43354</link> 
  </item> 
   
  <item> 
   <title>Changed in CVS.</title> 
   <description>Changed in CVS.</description> 
   <pubDate>Mon, 03 Mar 2008 18:49:31 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6299#t43355</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
