<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="http://bugs.horde.org/themes/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>Fri, 04 Jul 2008 22:42:38 -0400</pubDate>
  <link>http://bugs.horde.org/ticket/6299</link>
  <atom:link rel="self" type="application/rss+xml" title="global $conf empty" href="http://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['tmpdir']. Util::getTempDir()  falls back to php's upload_tmp_dir whenever it can't find $config['tmpdir'], therefor the cache files are in the wrong directory. 

i changed Horde::getTempDir() to print_r $conf  whenever it'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['tmpdir'] just untill the message has been sent (which is correct behavior imho).

I'm using the latest RC2 version of Horde/IMP</description>
   <pubDate>Wed, 20 Feb 2008 08:45:51 -0500</pubDate>
   <link>http://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't finished loading (and is not yet in the GLOBAL scope) when Horde::getTempDir() is called from conf.php.  

We'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 13:29:15 -0500</pubDate>
   <link>http://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'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>Sun, 24 Feb 2008 23:36:08 -0500</pubDate>
   <link>http://bugs.horde.org/ticket/6299#t42941</link>
  </item>
  <item>
   <title>
&gt;&gt; hasn't finished loading (and is not yet in the GLOBAL s</title>
   <description>
&gt;&gt; hasn'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't work anywhere besides Horde'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'm afraid the answer would be no, the problem persists through all applications.
</description>
   <pubDate>Mon, 25 Feb 2008 06:32:09 -0500</pubDate>
   <link>http://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'm referring to occurs in any application context.  To see what I mean, set $conf['tmpdir'] 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['tmpdir']; // This will show the correct value that you set.
echo $conf['cache']['params']['dir']; // This will incorrectly show the system's default tmp directory.

echo Horde::getTempDir(); // This will correctly show the conigured horde tmpdir default, since it's being executed after the app has been loaded in the registry.
</description>
   <pubDate>Mon, 25 Feb 2008 11:29:27 -0500</pubDate>
   <link>http://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't even be a PHP expression anymore then.</description>
   <pubDate>Mon, 03 Mar 2008 13:24:30 -0500</pubDate>
   <link>http://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 13:42:34 -0500</pubDate>
   <link>http://bugs.horde.org/ticket/6299#t43354</link>
  </item>
  <item>
   <title>Changed in CVS.</title>
   <description>Changed in CVS.</description>
   <pubDate>Mon, 03 Mar 2008 13:49:31 -0500</pubDate>
   <link>http://bugs.horde.org/ticket/6299#t43355</link>
  </item>
  

 </channel>
</rss>
