Frug / AJAX-Chat

A fully customizable web chat implemented in JavaScript, PHP and MySQL which integrates nicely with common forum systems like phpBB, MyBB, FluxBB, SMF and vBulletin. A Flash and Ruby based socket connection can be used to boost performance.
http://frug.github.io/AJAX-Chat/
545 stars 301 forks source link

PHP 8.1 breaks AJAX Chat #291

Open SergeantZombo opened 1 year ago

SergeantZombo commented 1 year ago

I use two instances of the AJAX Chat on my server and PHP 8.1 seems to have broken both of them after my hosting service upgraded to 8.1 since I get a blank white screen with no errors displaying instead of the normal log-in page when trying too access either chat. One is a standalone instance, the other uses phpBB. Downgrading my PHP version too 7.4 fixes the issue as a temporary solution but are there any plans in the future too upgrade the chat's PHP code too work with 8.1?

nicyu5774y commented 9 months ago

se usi php8.1 e hai una schermata bianca in questo caso devi inserire i dati per la connessione (quando e bianca vuole dirti attento che non hai messo nulla per la connessione) /lib/config.php

nicyu5774y commented 9 months ago

questo vale per ubuntu e linux

CouinCouin commented 6 months ago

@SergeantZombo I have the same problem, I think it will be never fixed, as well as the last version is near from 8 years old .

@nicyu5774y No, it's not a problem of empty config.php file :(

wintstar commented 6 months ago

for php Version > 8

check the file chat/lib/class/AJAXChat.php and remove

https://github.com/Frug/AJAX-Chat/commit/4e0594870c1fe0ac3390292825308eb593119bb8#diff-ff743c76833fef3194d3cb2c538ca472dd975809c739889198f04675eb2a6747

and for Database use msqli

https://github.com/Frug/AJAX-Chat/blob/d2fcf98e1a1147b69181f10bdb8c4ce0c7590588/chat/lib/config.php.example#L33

// Database type:
$config['dbConnection']['type'] = 'mysqli';

or look for this branch

https://github.com/Frug/AJAX-Chat/tree/psr-4

CouinCouin commented 6 months ago

Hi winstar,

Thanks a lot !!!! I would never find it myself lol

Modification of usual version did not resolved but the psr-4 branch did ! 👍

Another question without relation with chat, do you know BlueImp JQuery File Upload ? I use it but does not run since PHP 8 :(

Thanks :D

SergeantZombo commented 6 months ago

Thankyou Wintstar! You're a lifesaver. Your suggestions fixed my issue and the chat works with PHP 8 now. You're awesome! :)

wintstar commented 6 months ago

@CouinCouin, @SergeantZombo

I have forked the repository and added and planned a few more things. I should be finished with the changes in the course of next week at the latest.

https://github.com/wintstar/AJAX-Chat