Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Oil Console - cannot modify header information
  • When running the following command in oil console:
    Auth::create_user('admin', 'password', '', 100);

    I get the following warning: Warning - Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/blog/fuel/core/classes/cli.php:127) in COREPATH/classes/cookie.php on line 95 And also the error: Error - Email address already exists in PKGPATH/auth/classes/auth/login/simpleauth.php on line 212 I have Auth in my config.php, what else would be causing this first error? The second error: I have already run the command once so is kind of understandable. However, when I look in the users table in the db there is no entry. I'm a little lost, could somebody please explain. Thank you. Edit: If it helps, session.auto_start = 0 is set in my php.ini.
  • You can ignore the warning. The Auth class will try to set a cookie, which obviously doesn't work in a CLI context. Perhaps the Cookie class should check that. Can you create an issue for this on SimpleAuth runs a query on the table using the username, and shows that error if it finds a result. If the email address can be matched against the result, you will get that error. I can't find any evidence in the code that it would show that error on an empty table. FuelPHP doesn't use PHP sessions, so that php.ini setting isn't relevant.

Howdy, Stranger!

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

In this Discussion