It looks like you're new here. If you want to get involved, click one of these buttons!
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /customers/9/3/8/mysite.com/httpd.www/cms/fuel/codeigniter/core/Exceptions.php:186)
Filename: libraries/Session.php
Line Number: 689
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /customers/9/3/8/mysite.com/httpd.www/cms/fuel/codeigniter/core/Exceptions.php:186)
Filename: helpers/MY_url_helper.php
Line Number: 397
Comments
First you need to change the logout function:
function logout() { $this->delete_autologin(); // See http://codeigniter.com/forums/viewreply/662369/ as the reason for the next line $this->ci->session->set_userdata(array('user_id' => '', 'username' => '', 'status' => '')); $this->ci->session->sess_destroy(); $this->ci->session->sess_create(); }
This is necessary in order to be able to active accounts e.g. by clicking on the link in the registration email.
function show_php_error($severity, $message, $filepath, $line) { $severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity]; $filepath = str_replace("\\", "/", $filepath); // For safety reasons we do not show the full file path if (FALSE !== strpos($filepath, '/')) { $x = explode('/', $filepath); $filepath = $x[count($x)-2].'/'.end($x); } if (ob_get_level() > $this->ob_level + 1) { ob_end_flush(); } ob_start(); include(APPPATH.'errors/error_php.php'); $buffer = ob_get_contents(); echo $buffer; ob_end_clean(); }
For further information see:
http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php
require_once(FUEL_PATH.'../../application/libraries/phpass-0.1/PasswordHash.php');
to my model at the top. However
$hasher = new PasswordHash( $this->ci->config->item('phpass_hash_strength', 'tank_auth'), $this->ci->config->item('phpass_hash_portable', 'tank_auth')); // hash password $hashed_password = $hasher->HashPassword('12369874');
doesn't work and results in the following error:
Fatal error: Call to a member function item() on null in /customers/9/3/8/mysite.com/httpd.www/cms/fuel/application/models/users_model.php on line 39 which equals:
$this->ci->config->item('phpass_hash_strength', 'tank_auth'),
What might be causing this problem? I understand that the configuration for hashing can not be loaded because the function item() doesn't receive a value but I copied the exact same lines from PasswordHash.php.
Thanks for you help,
Wilhelmus
PS: I will post my full model here, once it is debugged, so other can use TankAuth with FuelCMS