Database error No. 1231

my website was working fine since i uploaded it a year ago. since a few days i suddenly get the error message 1231 in my 000webhosting website. i thought i can fix it by updating my codeigniter 3.1.7 to the latest version 3.1.10. didnt help. i changed the php version from 7.2 to 7.0 and later to 5.6, also made no difference. the error comes either right when i open my website or after i navigate through it. now i wonder is this a problem other users get as well and what can i do to fix it. is this a 000webhosting problem because of some new updates? or are the servers not running properly?

A Database Error Occurred

Error Number: 1231

Variable ‘sql_mode’ can’t be set to the value of ‘REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( @@sql_mode

SELECT 1 FROM ci_sessions WHERE id = ‘9mk3avf3kaocstm4rrcappec902q2msi’ AND ip_address = ‘62.46.120.82’

Filename: libraries/Session/drivers/Session_database_driver.php

Line Number: 363

i never had any issue with my codeIgniter database till now.
i didnt alter my database since i uploaded it.
so i thought it must be a problem with 000webhosting.

¡Tengo el mismo error! pero cuando cargo las paginas varias veces se soluciona, pero vuelve a aparecer en otras partes, espero den solución pronto:angustiado:

yes same happens to me. when i reload sometimes the website works, but i cant enter data.

Does

Not resolve it?

1 Like

Reading, I found that the error can be in a “restricted way” that the versions of MySQL have, but I’m still looking for a solution, in any case if I get a solution I will report it immediately.

Solved!.. I feel silly when the solution is of this complexity style hahahaemphasized text

that made it even worse in my website. i got several error messages, but then i fixed the first one “Field ‘user_agent’ doesn’t have a default value”. added a NULL as default value. and now it works. thanks a lot for your help!!!

If anyone is still having it post your URL alongside your config file and we can have a quick check, failing that seek advice at Stackoverflow.com or test locally XAMPP etc.

Thanks. Problem Solved.