Welcome Guest, Not a member yet? Register   Sign In
Tank Auth v1.0 (CI authentication library)
#71

[eluser]theshiftexchange[/eluser]
[quote author="Zewt" date="1244709151"]Have a small question.

I have been testing out Tank Auth and am running into this db error.
Quote:A Database Error Occurred
Error Number: 1364

Field 'user_data' doesn't have a default value

INSERT INTO `ci_sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES ('b3fc823b3c7fc718ef8a', '69.62.xxx.xx', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) Ap', 1244719880)

The
Code:
user_data
field is wanting some data obviously, as it is set to NOT NULL.
Code:
`user_data` text COLLATE utf8_bin NOT NULL,

Any ideas why I seem to be the only one having a problem with this?[/quote]

Can you post the login code where the session is created?
#72

[eluser]Zewt[/eluser]
I am very new to CI, so still getting used to its functionality.

I simply created a brand new default CI install, then installed Tank Auth exactly per instructions.

When I set
Quote:Open the application/config/config.php. Change $config['sess_use_database'] to TRUE
and go to my home directory (the welcome.php), and try to use the path /auth/login_form, that is the error I get.

I have no idea what is activating that session insert script, or from where.
#73

[eluser]Zewt[/eluser]
Still same error.

I am very new to CI, so sorry for any newbie mistakes.

I have the very basic starter install of CI, with the welcome.php

I added in the Tank Auth files as described, and set my route to "auth", but when I try to use /auth/register_form I get that error:
Quote:A Database Error Occurred
Error Number: 1364

Field 'user_data' doesn't have a default value

INSERT INTO `ci_sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES ('022f276ef9bcef53ea77c9e', '69.62.x3.x', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) Ap', 1244729999)

from the log file:
Quote:ERROR - 2009-06-11 00:44:02 --> Query error: Field 'user_data' doesn't have a default value
I saw an earlier post from someone with the same error, but they were using Postgres I believe.
I am using MySQL, and get the error.
I could change the field definition and remove the Not Null setting, but just want to make sure it is purely a design flaw and not something I am doing wrong.
#74

[eluser]vps4[/eluser]
[quote author="Zewt" date="1244717786"]Still same error.

I am very new to CI, so sorry for any newbie mistakes.

I have the very basic starter install of CI, with the welcome.php

I added in the Tank Auth files as described, and set my route to "auth", but when I try to use /auth/register_form I get that error:
Quote:A Database Error Occurred
Error Number: 1364

Field 'user_data' doesn't have a default value

INSERT INTO `ci_sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES ('022f276ef9bcef53ea77c9e', '69.62.x3.x', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) Ap', 1244729999)

from the log file:
Quote:ERROR - 2009-06-11 00:44:02 --> Query error: Field 'user_data' doesn't have a default value
I saw an earlier post from someone with the same error, but they were using Postgres I believe.
I am using MySQL, and get the error.
I could change the field definition and remove the Not Null setting, but just want to make sure it is purely a design flaw and not something I am doing wrong.[/quote]

same question
#75

[eluser]theshiftexchange[/eluser]
I created a new blank CI installation with a copy of the latest Tank Auth to try and replicate the problem.

For me it all worked ok.

I logged into the database with phpmyadmin and looked at the ci_sessions table - and interestingly it is set to NOT NULL with no default - but the "user data" fields were blank on some of my sessions.

So I'm wondering what version of MySQL you are running? It must be treating the fields slightly differently, and enforcing the rules differently.

Setting User_Data to default '' will fix the problem. Perhaps the database schema from the tank_auth.zip can be fixed to set a default aswell.
#76

[eluser]Laurentvw[/eluser]
Anyone who knows why I'm getting this error just after pressing the register button?

Code:
A PHP Error was encountered

Severity: Notice

Message: Undefined property: Auth::$email

Filename: controllers/auth.php

Line Number: 479


Fatal error: Call to a member function from() on a non-object in /var/www/vhosts/mysite.com/httpdocs/system/application/controllers/auth.php on line 479
#77

[eluser]Gromozeka[/eluser]
[quote author="Laurentvw" date="1245264467"]Anyone who knows why I'm getting this error just after pressing the register button?
[/quote]

It seems like CodeIgniter was unable to load email library in the previous code line:

Code:
$this->load->library('email');

Please check your CI installation, is the 'email' library there?
#78

[eluser]Laurentvw[/eluser]
[quote author="Gromozeka" date="1245271561"]
Please check your CI installation, is the 'email' library there?[/quote]
Yea it has always been there as a core library. Weird...
#79

[eluser]Khanh[/eluser]
Is Tank auth use for kohana framework?
#80

[eluser]Thorpe Obazee[/eluser]
[quote author="Khanh" date="1246606975"]Is Tank auth use for kohana framework?[/quote]

Are you serious? Does this look like the Kohana website?




Theme © iAndrew 2016 - Forum software by © MyBB