| Summary | global $conf empty |
| Queue | Horde Base |
| Queue Version | 3.2-RC2 |
| Type | Bug |
| State | Resolved |
| Priority | 2. Medium |
| Owners | Jan Schneider <jan (at) horde (dot) org> |
| Requester | bart-horde (at) xbar (dot) net |
| Created | 02/20/2008 (79 days ago) |
| Due | |
| Updated | 03/03/2008 (67 days ago) |
| Assigned | 02/24/2008 (75 days ago) |
| Resolved | 03/03/2008 (67 days ago) |
| Attachments | |
| Milestone | |
| Patch |
State ⇒ Resolved
Assigned to Jan Schneider
Changed in CVS.That seems like the only reasonable fix to me.So, what do we do? Not defaulting to Horde::getTempDir()? Shouldn't even be a PHP expression anymore then.> 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->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.
>> hasn't finished loading (and is not yet in the GLOBAL scope) when
>> Horde::getTempDir() is called from conf.php.
>
> 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.
Priority ⇒ 2. Medium
State ⇒ Feedback
> 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() -> 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.
So it works in apps, but not in Horde, right?
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() -> 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.
Queue ⇒ Horde Base
Summary ⇒ global $conf empty
Type ⇒ Bug
Priority ⇒ 3. High
State ⇒ Unconfirmed
$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