Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Database exception whitelist
  • Hello,

    I am writing an installation wizard which asks the user the db credentials that I save in the config/db.php.

    My question is, FuelPHP thrown a Database_Exception on this page because db.php has not been populated yet. That is normal behaviour.

    But I would like to bypass this exception to leave time for the user to input the db credentials.

    Is there any way to do that?


  • HarroHarro
    Accepted Answer
    It won't throw an Exception on a missing db configuration, it probably throws an exception because you want to run a DB command while not having a db configuration.

    So the obvious answer is: don't do that. ;)

    Any idea what runs the DB command? Perhaps you're using Sessions with a db backend, and you autoload the Sessions class?

  • Good guess Harro. I had a session  loaded somewhere in my template file which ran the DB command.
    Thanks for your help!

Howdy, Stranger!

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

In this Discussion