Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
any news on rc3 ?
  • hi any news on rc3 ?
  • hmm i get almost the same error with rc3
    Fuel\Core\Fuel_Exception [ Error ]: Database type not defined in fuel configuration
    
  • I assume that's the same error? 'dev' has been changed to 'development'...
  • nope the same error message
    the config looks like this
    return array(
     'active' => Config::get('environment'),
     Fuel::DEVELOPMENT => array(
      'type'   => 'mysql',
      'connection' => array(
       'hostname'   => 'localhost',
       'database'   => 'fuel',
       'username'   => 'root',
       'password'   => '',
       'persistent' => false,
      ),
      'table_prefix' => '',
      'charset'      => 'utf8',
      'caching'      => false,
      'profiling'    => true,
     ),
     Fuel::PRODUCTION => array(
      'type'   => 'mysql',
      'connection' => array(
       'hostname'   => 'localhost',
       'database'   => 'fuel',
       'username'   => 'root',
       'password'   => '',
       'persistent' => false,
      ),
      'table_prefix' => '',
      'charset'      => 'utf8',
      'caching'      => false,
      'profiling'    => false,
     )
    );
    
  • By default, it will load the database defined as 'active', which you define here as Config::get('environment'). What's defined there?
  • in config.php i have
    'environment' => Fuel::DEVELOPMENT
    

    i even changed the db config in
    return array(
     'active' => 'development',
     'development' => array(
      'type'   => 'mysql',
      'connection' => array(
       'hostname'   => 'localhost',
       'database'   => 'fuel',
       'username'   => 'root',
       'password'   => 'mypashere',
       'persistent' => false,
      ),
      'table_prefix' => '',
      'charset'      => 'utf8',
      'caching'      => false,
      'profiling'    => true,
     )
    );
    

    same problem
  • How do you create the database connection? When the DB class creates an instance, it will
    - load the db config file
    - if no named instance is loaded, it gets db.active from the config
    - if no instance by that name exists, it fetches the config (in your case db.development)
    - it checks if a type is defined
    - if not, throw the "Database type not defined in {$name} configuration" error So assuming that your db.active is indeed correct (it contains 'development'), and you have a 'development' section in your database config defining the type 'mysql', I'm out of explainations. I suggest debugging the core/classes/database/connection class, in particular the instance() method, to see what's going wrong.
  • i downloaded the rc3 zip
    made the settings in config.php
    added the db info in the db config
    configured the session to autoinit and use the db
    and called $session = Session::instance(); in welcome controller
    i need to autoload the db class or something like that ?
  • solved my problem in the session config is
    'database' => '' // name of the database name (as configured in config/db.php)
    i was writing the actual database name
    i'm a idot sorry for the trouble WanWizard and thanks for your help
  • I would better welcome final version! =]
  • Dan was planning to release it wednesday, not sure what the delay is. The current dev branch is very stable, more so than RC2(.1) even as far more bugs have been fixed.
  • Just switched to newest code. Why do I get this?
    Fuel\Core\Fuel_Exception [ Error ]: Database type not defined in development configuration

    This is my config/db.php. Edit: dev is defined! Edit #2: I don't see what he is angry about! =D http://pastie.org/1980649
  • I'm not sure if this is your problem, but at some point the config environment was changed from "dev" to "development."
  • Thanks, Mitchell. That solved the problem. x)

Howdy, Stranger!

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

In this Discussion