Which column type in database is column ip_address ... you need to extend widht or change type of column
Dec 8, 2016
6
Level 3
Session :: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'ip_address' at row 1
Hello,
i configured laravel to update session in database like described in documentation (https://laravel.com/docs/5.3/session#storing-data). Everything work fine for 3 websites (on localhost and web hostings), but one return me a strange behaviour (on web hosting) that i never saw before :
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'ip_address' at row 1 (SQL: insert into `sessions` (`payload`, `last_activity`, `user_id`, `ip_address`, `user_agent`, `id`) values ("PAYLOAD_BASE64_STRING", 1481189194, , USER_IP_ADDRESS unless { src 46.105.192.0/20 137.74.120.0/22 51.254.41.128/26 51.254.41.192/26 }, "USER_AGENT_SPEC", "SESSION_ID"))
As you can see, the error is related to the following content :
USER_IP_ADDRESS unless { src 46.105.192.0/20 137.74.120.0/22 51.254.41.128/26 51.254.41.192/26 }
Did you see something like this before ? What solution can i use to fix it ? Any idea ?
Level 51
Please or to participate in this conversation.