Part of the EllisLab Network
   
 
database error default values
Posted: 01 October 2008 05:35 AM   [ Ignore ]  
Summer Student
Total Posts:  2
Joined  09-23-2008

Hi

Found a bug (I think)

I’m using igniter 1.6.3, codex2 rc14.2, PHP5 and MySQL5.
After install, when I try to access the page to login it gives me this error

A Database Error Occurred
Error Number: 1364
Field ‘session_data’ doesn’t have a default value
INSERT INTO ci_sessions (session_id, session_start, session_last_activity, session_ip_address, session_user_agent) VALUES (‘1b02c4a60be799d5f85d0682298dad23’, 1222853353, 1222853353, ‘127.0.0.1’, ‘Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv’)

To over pass this, i change the default value of the field “session_data” to NULL. Then I can make the login and access the backend. But when I try to insert a value in Related Example I get other error

A Database Error Occurred
Error Number: 1364
Field ‘example_id’ doesn’t have a default value
INSERT INTO `related_example` (`name`, `description`) VALUES (‘dsgfg’, ‘dfgfdhg’)

Profile
 
 
Posted: 12 February 2009 02:56 PM   [ Ignore ]   [ # 1 ]  
Summer Student
Total Posts:  2
Joined  01-12-2009

The issue described here is related to MySQL5 strict mode which can be turned off in my.ini file. Not sure if it is the best workaround to the problem. Has anybody solved this issue the other way?

Profile