Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Choosing environment for Oil
  • When I run
    php oil refine migrate
    
    I get the error "Access denied for user 'root'@'localhost' (using password: YES)", which is my DEVELOPMENT environment. I've used .htaccess to set the environment to PRODUCTION, but Oil isn't picking it up?
  • htaccess sets a value if you zahodesh via http (s): / /, the console in no way in contact with. htaccess, you probably need to specify the value in the config.php
  • Thanks! So what's the best way to handle the environment then? Because if putting it in .htaccess is effectively useless, and I don't want to have different versions of my config.php file.
  • Setting environment variables works like a charm. Chuck this in your php.ini:
    SetEnv FUEL_ENV "production"

    This is loads easier on cloud services like Pagodabox and PHPFog as they interfaces for it, but it works nicely on your servers too. Obviously putting this in .htaccess DOES work for Apache requests but oil won't look there, so don't try that shortcut.

Howdy, Stranger!

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

In this Discussion