[support] Issues with initializing Variables on startup..

Earnie Boyd earnie at users.sourceforge.net
Tue Jan 29 20:38:57 UTC 2008


Quoting Scott Matthews <smatthews at optaros.com>:

> Conf_init calls conf_path.  the first line in conf path is:
>   static $conf = '';
>
> As I said, once I globally changed the intended array variable to  
> something other than $conf ($config_vars for instance) it worked as  
> expected.
>
> Now, as I mentioned before, before I tried to initialize in the  
> settings.php file, I just relied on the database value that I set.   
> This was not being retrieved when I called variables_get() and  
> variables_get() was only returning the value I had as the default.   
> The only thing I can think of from what you are saying is that in my  
> module I have to specifically call variables_init() for it to work.   
> Is that true?  when in the stack is variables_init called?
>

During the bootstrap phase of course.  The $conf variable is a Drupal 
reserved global variable.  You can find the rest of the global 
variables (and constants and functions and ...) by using the 
http://api.drupal.org reference.

Earnie -- http://for-my-kids.com/
-- http://give-me-an-offer.com/



More information about the support mailing list