Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
php oil refine migrate --packages=auth
  • What will happen after I write into cmd on Windows:
    cd E:\Programs\xampp\htdocs\fuelphp-1.7.2
    php oil refine migrate --packages=auth
    Where will be my table generated? Do I need before that to write in my config.php or in simpleauth.php when I copied it first in app/config- host, password, user, table?
    I want to add Simpleauth to my website.
    I use xampp. Will be here generated - localhost/phpmyadmin?
  • Yes, you have to set config files before running `php oil refine migrate --packages=auth`.
    The command reads configs and generates tables for it.


  • You need to first set up your database (that is configure XAMPP such that a MySQL server is running). Then set up a user for your Fuel app of which the login credentials will go into fuel/app/config/db.php or, even better, into fuel/app/config/development/db.php. Furthermore, copy the config files fuel/packages/auth/config/auth,php and fuel/packages/auth/config/simpleauth.php to fuel/app/config/ or, even better, fuel/app/config/development/. Then and only then you can run ```php oil r migrate --packages=auth```.
  • In addition, by default oil runs in the development environment, which you can check with "php oil -v".

    If your server is configured for a different environment, like production or staging, you need to tell oil which environment to use. You do this by setting the FUEL_ENV environment variable. On linux you can pass this on the commandline, I don't know how that works in Windows.
  • I manage to do it. I have to learn in which environment I am and that there are environments at all. I simple changed in my development folder - db.php settings. Thank you.
  • HarroHarro
    Accepted Answer
    By default you are in the development environment. Any other environment you have to specify, either in your virtualhost definition, or in your .htaccess.

    The idea behind environments is that you can easily port your application from one server to the next, and keep environment specific settings apart. This is the most logical for your database configuration, but that could also be true for your email config, or your session config.
  • Thank you.

Howdy, Stranger!

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

In this Discussion