Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Fuel1.4 - No database selected and config files are empty?
  • Hello there

    I have upgraded to Fuel1.4 by both downloading and using the command on the help page.

    When I try to use:

    php oil refine migrate

    It reports;

    1046 - No database selected [ CREATE TABLE IF NOT EXISTS `migration` (
    `type` varchar(25) NOT NULL,
    `name` varchar(50) NOT NULL,
    `migration` varchar(100) DEFAULT '' NOT NULL
    ) DEFAULT CHARACTER SET utf8; ] in COREPATH/classes/database/mysqli/connection.php on line 243

    In the config files, both config/db.php and config/config.php are empty, a la;

    return array(

    I thought it might be because the files did not download properly so I tried 3 times and each time the config files are empty.

    I set up the config files to load the ORM package and force the config/db.php to use the production database.

    I know the database exists because XAMPP (Mac) is working and I can access the database no problem on Safari.

    I'm not sure what I've done wrong.  


    1. Config files like config/config.php and config/db.php  I find this a bit hard to know what to do with these as it gives no indication to a newbie what should be put in here

    2. The php oil migrate command keeps telling me to select a database, even though I've set up the databases and the config files for each stage.

    Any help on either of these would be cool.

  • Has been fixed in the 1.4/master repo and the zipfile.

    This is caused by fuel/core/config/db.php, which by mistake lists both the PDO and MySQLi driver sections for the 'default' driver, so the MySQLi sections overwrites the PDO section.

    Either correct this in the core config file, or copy the PDO section from the core config file to app/config/db.php to fix this.
  • I'm having the same problem as well. I ran the command line installation utility which I believe then should clone the master repo. So I don't think it's been corrected yet.

    But otherwise, it should be alright to download a config.php file manually ?
  • I just checked the history on the file. The contents have been moved to the core directory. It's to ensure that an update doesn't overwrite your custom config settings. So you can copy the config.php file from there.
  • The idea is that all defaults are in the core, in your app you only put the config values you want to override.

Howdy, Stranger!

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

In this Discussion