Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Database type not defined in fueldepo configuration
  • i am trying to run a cloned  fuel depo (https://github.com/fuel/depot.git) but i am getting this error. what is wrong and missing?

    Fuel\Core\FuelException [ Error ]: Database type not defined in fueldepo configuration

    Database type not defined in fueldepo configuration
    COREPATH/classes/database/connection.php @ line 65
    60                $config = \Config::get("db.{$name}");
    61            }
    62
    63            if ( ! isset($config['type']))
    64            {
    65                throw new \FuelException("Database type not defined in {$name} configuration");
    66            }
    67
    68            // Set the driver class name
    69            $driver = '\\Database_' . ucfirst($config['type']) . '_Connection';
    70

    i tried these configurations but seems to not work, although i was able to update the database through oil migrate using the first configuration.

    'default' => array(
            'type'        => 'pdo',
            'connection'  => array(
                'dsn'        => 'mysql:host=192.168.25.2;dbname=fueldepo',
                'username'   => 'root',
                'password'   => 'root',
            ),
            'profiling'    => true,
        ),
    'default' => array(
            'type'        => 'mysql',
            'connection'  => array(
                'dsn'        => 'mysql:host=192.168.25.2;dbname=fueldepo',
                'username'   => 'root',
                'password'   => 'root',
            ),
            'profiling'    => true,
        ),
    'default' => array(
            'type'        => 'mysqli',
            'connection'  => array(
                'hostname'   => 'localhost',
                'port'       => '3306',
                'database'   => 'fueldepo',
                        'username'   => 'root',
                        'password'   => 'root',
                'persistent' => false,
            ),
            'identifier'   => '`',
            'table_prefix' => '',
            'charset'      => 'utf8',
            'enable_cache' => true,
            'profiling'    => false,
            
            
      TIA

  • a few minutes after, i was able to make it work. i updated session.php and set the db property's 'database' => 'default'. 'default' is the name of the active database configuration(db.php). now browsing the depo ;).

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

  • nino December 2012