Revoluzifer
Revoluzifer

Reputation: 323

FuelPHP oil refine migrate not working

I'm stuck at the beginning of a new site. It's my first time, trying to use oil for generation / migration.

I successfully create a model using oil and now I want to migrate it, but

php oil refine migrate

gives me an error:

Error - invalid data source name in COREPATH/classes/database/pdo/connection.php on line 94

With a little bit of research I found out, that at least I'm not completely alone with this error, though none of the discussions I saw has been solved so far.

My db-configuration is all fine and regarding some hints I even overwrote php-cli's php.ini with the one, apache is using.

But no luck at all.

Anybody out there, who knows a solution? Any help appreciated!!!

EDIT: I wanted to go on developing even without oil but now found that I can't even run migration from php. It's the same error message which doesn't help at all. Please guys, anybody just has to know a solution...

Upvotes: 1

Views: 1405

Answers (1)

agit
agit

Reputation: 151

have you set the database conneection in the file: fuel/app/config/development/db.php? and is in the correct form:

return array(
    'default' => array(
        'connection' => array(
            'dsn' => 'mysql:host=localhost;dbname=fuel_intro',
            'username' => 'root',
            'password' => '',
        ),
    ),
); 

By the error it sounds like you may have the wrong sytax in your config. I hope this is helpful, if not please post your db config file source.

Upvotes: 1

Related Questions