DanWin / le-chat-php

A PHP Chat based on LE CHAT
https://danwin1210.de/chat/
GNU General Public License v3.0
268 stars 98 forks source link

SQL errors at guest login #137

Closed 011248163264 closed 1 year ago

011248163264 commented 1 year ago

Hi, i have a install with php8.2 and i will change the backgroud color but its not working

011248163264 commented 1 year ago

users cannot login with php82 but the admin can login. when a user register or login its only a white site

011248163264 commented 1 year ago

2023/05/13 21:55:31 [error] 169544#169544: *1368 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'bgcolour' at row 1 in /chat.php:2676

011248163264 commented 1 year ago

[Mon May 15 13:00:37.495388 2023] [cgi:error] [pid 32053] [client :55826] AH01215: Stack trace: [Mon May 15 13:00:37.496063 2023] [cgi:error] [pid 32053] [client :55826] AH01215: #0 /public_html/le-chat-php-master/chat.php(2676): PDOStatement->execute() [Mon May 15 13:00:37.496731 2023] [cgi:error] [pid 32053] [client :55826] AH01215: #1 /public_html/le-chat-php-master/chat.php(2582): write_new_session() [Mon May 15 13:00:37.497363 2023] [cgi:error] [pid 32053] [client :55826] AH01215: #2 /public_html/le-chat-php-master/chat.php(2749): create_session() [Mon May 15 13:00:37.498062 2023] [cgi:error] [pid 32053] [client **:55826] AH01215: #3 /public_html/le-chat-php-master/chat.php(103): check_login() [Mon May 15 13:00:37.498653 2023] [cgi:error] [pid 32053] [client ***:55826] AH01215: #4 /public_html/le-chat-php-master/chat.php(72): route() [Mon May 15 13:00:37.498729 2023] [cgi:error] [pid 32053] [client :55826] AH01215: #5 {main} [Mon May 15 13:00:37.499350 2023] [cgi:error] [pid 32053] [client :55826] AH01215: thrown in /public_html/le-chat-php-master/chat.php on line 2676

011248163264 commented 1 year ago

@DanWin can you find a solution for this, i have a running project with your chat. But i cannot use them with the issues.

011248163264 commented 1 year ago

i have also setup another test on a cleanetdomain with php74 its the same issue

011248163264 commented 1 year ago

ok found a workaround, go to the database: sessions > bgcolour change the 6 to a higher value, Allow nulls? = yes and save the row. login as guest is working

gittyspirit commented 1 year ago

Where is nulls?=yes

011248163264 commented 1 year ago

when you chnage the database field bgcolour you can say NULL allow yes or no it meens the field can contain null data when the data is stored. Its not a final sollution, but it works, @DanWin have to change this in the code. Or i make a pull request