Welcome Guest, Not a member yet? Register   Sign In
Community auth: problem with login
#6

(This post was last modified: 07-30-2017, 02:14 AM by Sten. Edit Reason: adding more information )

(07-29-2017, 09:19 PM)skunkbad Wrote: There is no magic. If it worked and now it doesn't, I can tell you why. Zip up your files, and include a database dump in /sql. Put it only somewhere where I can download it.

In every case that I have done this for somebody, they're always making some configuration mistakes or something. I'll let you know what I find. Be patient, as the next day is my only day off. (I work 6 days a week).

Here is the link to my dummy project: http://www.mediafire.com/file/q0ms5yd6fx...y_test.rar
You can access to the login page via http://localhost/rakuyomi/login
I put the sql file in application\third_party\community_auth\sql
I have made some name changes to the Examples folder (Examples -> Auth), but no logic changes at all.

Please have a look. Thanks and regards.

---------------------------------------

UPDATE:

Okay, so after I add the hidden input "login_token" to the "login_form.php", it worked now. But
I still don't understand why it used to work before when I first installed Community-Auth
(at that time I remember I didn't add any input to the example login_form.php), and the default
login_form.php file does not come with login_token out-of-the-box.
That's the first thing.

The second thing is,
I'm now encounting another the issue, that is when I set 
$autoload['libraries'] = array('session') in autoload.php, I keep getting this error message when trying to login:


Code:
A Database Error Occurred
Error Number: 1048
Column 'id' cannot be null
INSERT INTO `auth_sessions` (`id`, `user_id`, `login_time`, `ip_address`, `user_agent`) VALUES (NULL, '1', '2017-07-30 10:54:29', '::1', 'Chrome 59.0.3071.115 on Windows 10')
Filename: C:/xampp/htdocs/rakuyomi/system/database/DB_driver.php
Line Number: 691 


And if I stick the "Remember Me" checkbox, I get the above error plus a new one:

Code:
A PHP Error was encountered

Severity: Warning

Message: setcookie() expects parameter 3 to be integer, float given

Filename: core/MY_Input.php

Line Number: 116

Backtrace:

File: C:\xampp\htdocs\rakuyomi\application\core\MY_Input.php
Line: 116
Function: setcookie

File: C:\xampp\htdocs\rakuyomi\application\third_party\community_auth\libraries\Authentication.php
Line: 677
Function: set_cookie

File: C:\xampp\htdocs\rakuyomi\application\third_party\community_auth\libraries\Authentication.php
Line: 280
Function: maintain_state

File: C:\xampp\htdocs\rakuyomi\application\third_party\community_auth\libraries\Authentication.php
Line: 204
Function: login

File: C:\xampp\htdocs\rakuyomi\application\third_party\community_auth\core\Auth_Controller.php
Line: 169
Function: user_status

File: C:\xampp\htdocs\rakuyomi\application\controllers\Auth.php
Line: 295
Function: require_min_level

File: C:\xampp\htdocs\rakuyomi\index.php
Line: 315
Function: require_once

Not sure if any other configurations affected, but you can reproduce with my dummy project above.
Is there a conflict of session library from the CI and the Community-Auth ?
Reply


Messages In This Thread
Community auth: problem with login - by Giba - 07-04-2017, 04:28 PM
RE: Community auth: problem with login - by Sten - 07-29-2017, 08:50 PM
RE: Community auth: problem with login - by Sten - 07-29-2017, 10:10 PM
RE: Community auth: problem with login - by Sten - 07-29-2017, 09:55 PM
RE: Community auth: problem with login - by Sten - 07-30-2017, 07:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB