Welcome Guest, Not a member yet? Register   Sign In
Database error with Authentication library
#1

[eluser]anand9[/eluser]
Hi,

i am new to codeigniter.. i installed Tank Auth library, but when i take my site i get an error

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 ('c05a01e2547621f2d5cdc231d9afc007', '127.0.0.1', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) Ap', 1267093664)

i imported the db file of Tank Auth into my db which had an existing table with 3 fields.
i tried DX_auth also, but getting the same error... Sad

can some1 plz help me what this could be?
#2

[eluser]steelaz[/eluser]
Are you developing on local machine? Most likely your MySQL is running in strict mode.
#3

[eluser]anand9[/eluser]
Yes, i am running on my localhost... WAMP server....
can you tell me how to fix it?
#4

[eluser]steelaz[/eluser]
http://forum.mambo-foundation.org/showthread.php?t=5254

Your my.ini should be in wamp/bin/mysql/mysqlx.x.x/
#5

[eluser]anand9[/eluser]
Thanks bro.. it worked...
i run this script from my phpmyadmin

Code:
SET @@global.sql_mode= '';

and it worked like a charm... Smile
#6

[eluser]anand9[/eluser]
hi,
Code:
SET @@global.sql_mode= '';
worked at first.. but every time i restart my server, the error shows again, and i have to run the code again... Sad
can someone please help me out?
#7

[eluser]steelaz[/eluser]
You'll need to change it in my.ini file. See the link I posted above.
#8

[eluser]anand9[/eluser]
unfortunately i could not find the code
Code:
# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
in my my.ini. i am using the version 5.1.36




Theme © iAndrew 2016 - Forum software by © MyBB