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/
548 stars 300 forks source link

Update for phpBB 3.1 #191

Closed scootergrisen closed 9 years ago

scootergrisen commented 9 years ago

Seems direct access to $_SERVER is not allowed in phpBB 3.1. So could you update the code so it works with phpBB 3.1 ?

Frug commented 9 years ago

See issue #183

s-s-s commented 9 years ago

@scootergrisen, try edit code in line 31 of AJAXChatLanguage.php like this:

// if(empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { if(empty($request->server['HTTP_ACCEPT_LANGUAGE'])) {

scootergrisen commented 9 years ago

I have deleted the chat on my website now. But as i remember $_SERVER was used in a lot of places.

Frug commented 8 years ago

_SERVER was used in a ton of places, along with _REQUEST and _POST. The solution was to enable access to superglobals via $request->enable_super_globals(); in custom.php