title: Using a Kohana Config in a non Kohana app
body: <p>Is there an easy way to use a Kohana DB config file in a non Kohana app? I can't seem to figure it out by reading through the Kohana_Config class.</p>
  
  <p>Why? Say I have a cron task that sits in the same directory and I'd like it to use the same DB config.</p>
  
  <p>This silly attempt ended at a fail...</p>
  
  <pre><code>function connection(){
      $connection = file_get_contents('../application/config/database.php');
      eval($connection);
  }
  </code></pre>
  
  <p>Here is a sample of the config: </p>
  
  <pre><code>return array
  (
      'default' =&gt; array
      (
              'type'       =&gt; 'mysql',
              'connection' =&gt; array(
                      'hostname'   =&gt; 'localhost',
                      'database'   =&gt; 'some_db',
                      'username'   =&gt; 'root',
                      'password'   =&gt; 'root',
                      'persistent' =&gt; FALSE,
              ),
              'table_prefix' =&gt; '',
              'charset'      =&gt; 'utf8',
              'caching'      =&gt; FALSE,
              'profiling'    =&gt; TRUE,
      ),
  </code></pre>