I have installed PHPFreeChat 5.x-1.0-beta4 in my drupal 5.7 and it is not working properly. It just says "loading" and hangs.

Following are the configurations that i have made.

1) Downloaded phpfreechat 1.1 from http://phpfreechat.net and installed it under modules/phpfreechat/phpfreechat directory.

2) Configured the content type(say 'page') by enabling the option 'Show chat room : Per Node' and saved this configuration.(Infact i have also tried with 'Show chat room : Always').

3) When i visited any page(say 'node/1'), it just says 'Chat Loading....Please wait' and hangs. I have encountered the following errors when visiting this page.
a) 'browserSupportsCookies is not defined'
b) 'Event.observe is not a function'

4) I have also tried with the updated PHPFreechat version from 'http://permutations.com/drupal/phpfreechat.php' and installed it.I have logged in two separate users in both IE and FireFox. Both the users can chat smoothly but when they click on any of the other users on the right hand side, it fails to pop up the chat window.
But when sombody tries to access my machine (say http://abc.com/node/1), they will facing the same problem like 'Page loading....'.

5) I will keep on getting the following error on every AJAX refresh.
uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLBodyElement.appendChild]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: /files/phpfreechat/public/js/pfcclient.js :: anonymous :: line 1397" data: no]

Please let me know if i missed out any step while installation or configuration

Comments

wclkw’s picture

hi there,
similar problem here with PHPFreeChat 5.x-1.0-beta4 in my drupal 5.7. Working fine with firefox. Chat loading...display for IE7. When I click the Error at the bottom status bar. It shows the following:
Line: 160
Char: 7
Error: 'null' is null or not an object.

nagarajanl, have you found your solution? Any suggestion? Thanks in advance.

permutations’s picture

Status: Active » Closed (fixed)

Please try the latest version (1.2). Before installing it, fully uninstall the previous version of phpFreeChat, make sure the phpFreeChat folder under Files is deleted, delete any chat nodes you've created, and clear your browsers cache (then close and reopen your browser). If you skip any of these steps, you can have problems loading the chat.

BradM’s picture

Version: 5.x-1.0-beta4 » 5.x-1.3
Status: Closed (fixed) » Active

Just downloaded and testing for the first time, brand new install, and I get this same error in both browsers -- "Chat loading ...Please wait."

Yet the 'demo' side of things loads fine. (/modules/phpfreechat/phpfreechat/demo/)

permutations’s picture

Assigned: Unassigned » permutations
Category: bug » support

The JavaScript for the demo is different from the JavaScript for the chat within Drupal. (I added an "away" feature and various Drupal-specific items on the username link.) So running the demo can create cache confusion. I've had this problem, too.

Try this. First, clear your browser's cache and close the browser. Then launch your ftp program and delete the phpFreeChat subdirectory under the files directory. Now relaunch your browser. You should be able to get into the chat.

phpFreeChat is very touchy this way - it caches the php code and JavaScript and then gets completely confused when you make any kind of change. That's why upgrading to a new version is such a big pain. You have to clear everything and start again.

BradM’s picture

thanks for the suggestions, I'll give it a try tomorrow and let you know what happens. I'd try it now but I have to wait for the sysadmin to delete the files for me. For some strange reason, when directories are created by a php script on the server, ownership goes to "www" or something like that -- so I basically can't make any modifications to them. This happens with a few modules. :(

BradM’s picture

Thanks for the suggestions, but unfortunately it still doesn't work. I even took the extra steps to remove all other blocks on the page, plus any javascript I had hard-coded into the template file...still get the same "loading..." message in both browsers.

It was worth a shot. I'll just stick with FlashChat even though the integration isn't seamless. Oh, also I did notice that something with this chat conflicts with the DHTML menu module -- the DHTML doesn't work on the page. Even disabling those blocks didn't help.

Thanks anyway!

joey santiago’s picture

hi there

same problem here: brand new install of phpfreechat 5.x-1.3 and phpfreechat 1.2. It is a little bit different, though: i can access it from localhost and it works fine, but shows chat loading from another pc...

can anyone help me?

EDIT: i noticed that when i connect from other computers it still tries to connect to "localhost" at some point... so i tried to change to my server's ip address every reference to "localhost" in phpfreechat code (src/containers/mysql.class.php (even though i think it is useless) and src/commands/connect.class.php). Still no success...

thanks

MGParisi’s picture

Same Issue Here!

MGParisi’s picture

Firefly will break here...

files\phpfreechat\public\prototype.js line 4060

var $continue = new Error('"throw $continue" is deprecated, use "return" instead');

I deleted this line and it seemed to start to work... I am testing this further...

will add more as I get more!

Edit: Feb 16 1:00 EST --> Deleting this line SEEMS to fix the issue with no ill side effects!

MGParisi’s picture

Causes errors in JScript Tools when Tabs is enabled, and also when Google Analytics is used. These errors cause IE to stop running the script.

The above fix works for all other browsers, but only for a certain period of time. Then it starts to fail again. I have no other information except that the above plugins may conflict with the newest version of the chat.

Also the Beta versions of this program has a security hole in it. Therefor if this is related to the release version of 1.2 rather then the beta version as mentioned in the documentation, then everyone who has this chat running has a potential security issue on their hands... Maybe this will encourage a fix.

Manonline’s picture

Version: 5.x-1.3 » 6.x-1.1
Assigned: permutations » Unassigned

hi! sorry for my english, but i have the same issue.

i'm using drupal 6.10 in a linux server.

i have an other local server in windows but the icons isnt showing neither. i'v chaged the base_url in settings.php and default.settings.php but still without working.

thanks,
mariano.

MGParisi’s picture

Give up and use FlashChat... its stable with all javascript and modules... Permutations did an amazing job with this module, but unfortunately phpfreechat has to be re-written for current standards (JQuerry, AHAH, etc)...

All other Drupal chat solutions are useless. PHPFreeChat and Flash Chat are the only free ones worth their weight in gold!

BleuBiRTH’s picture

same problem with drupal 6 and phpfreechat 1.2.

The icons don't show up, changed the base_url in settings.php, chat keeps saying loading... without doing anything. Spend hours looking for the problem, without any luck.

#12 you're speaking about flash chat, is this a module for drupal 6, because i can't find it. The demo of phpfreechat works perfectly tough, it's what i need in drupal, but doesn't word so far...

anyone a solution?

MGParisi’s picture

Flashchat is not GNU so it is not on Drupal... Did you try to google? Also check the forum for the updated code module. I also have a name...

BleuBiRTH’s picture

ok, phpfreechat works!

what have i done?

uninstalled phpfreechat module

deleted the following maps:

..../sites/all/modules/phpfreechat
..../sites/default/files/phpfreechat

deleted every chatnode

reinstalled phpfreechat module and phpfreechat 1.2. Don't ask me how, but now it's working perfectly.
thx to permutations for bringing phpfreechat to drupal 6!

permutations’s picture

Status: Active » Closed (fixed)

BlueBirth - glad to hear you got it working. I suspect that most of the problems people are having are due to not fully uninstalling the previous version of phpFreeChat before installing the new one. I warn to do this in install.txt, but it's a pain so people probably don't.

kasiawaka’s picture

I have the same issue, "Chat loading" message.

I am on Drupal 6.10 with multisite installation (sub-site where I'm trying to install phpFreeChat is called "collaboration"), using Firefox 3.0.8, on PHP 5.2.
Just for the record, I also tried to install phpFreeChat on the main installation and got the same results.

The phpFreeChat module (phpfreechat-6.x-1.1) was downloaded to /sites/all/modules, I added subdirectory phpfreechat and downloaded there phpfreechat-1.2
Enabled module in Drupal, changed the settings (admin/settings/phpfreechat) for the Default Title and Default Channels, enabled "Talk on chat channels" for authenticated users (admin/user/permissions).
Added new content type called Chat and setup "Always" to add chat to this content type nodes.
Created new Chat type pages called "Chat rooms". The phpFreeChat frame is automatically added there but is says "Chat loading. Please wait" and nothing happens for minutes on end (I think I waited about 15min).

When I go to the demo page (/sites/all/modules/phpfreechat/phpfreechat/demo/) and pick the any demo, I get bunch of errors (please note that I replaced my root folder with [mysiteroot]):

Warning: mkdir() [function.mkdir]: Permission denied in [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/pfctools.php on line 150

Warning: mkdir() [function.mkdir]: No such file or directory in  [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/pfctools.php on line 150

Warning: mkdir() [function.mkdir]: Permission denied in  [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/pfctools.php on line 150

Warning: mkdir() [function.mkdir]: No such file or directory in  [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/pfctools.php on line 150

phpFreeChat cannot be initialized, please correct these errors:

    *  [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/../data/private is not writeable
    *  [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/../data/private/cache can't be created
    *  [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/../data/private/cache is not writeable
    *  [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/../data/private/cache is not readable
    * cannot create  [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/../data/public/themes/default
    * cannot create  [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/../data/public/themes/default
    * [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/../data/private/chat can't be created
    *  [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/../data/private/chat is not writeable
    *  [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/../data/private/chat is not readable
    *  [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/../data/private/chat/s_df6c1052a9a8dce030dbf2a8746b13cf can't be created
    *  [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/../data/private/chat/s_df6c1052a9a8dce030dbf2a8746b13cf is not writeable
    *  [mysiteroot]/sites/all/modules/phpfreechat/phpfreechat/src/../data/private/chat/s_df6c1052a9a8dce030dbf2a8746b13cf is not readable

I went back to my "Chat rooms" node, turned on the debug and got this:

Parameters: Array
(
    [data_private_path] => [mysiteroot]/sites/[mysiteurl].collaboration/files/phpfreechat/private
    [data_public_url] => http://[mysiteurl]/collaboration/sites/[mysiteurl].collaboration/files/phpfreechat/public
    [data_public_path] => [mysiteroot]/sites/[mysiteurl].collaboration/files/phpfreechat/public
    [theme_url] => http://[mysiteurl]/collaboration/sites/all/modules/phpfreechat/extras/themes
    [theme_path] => [mysiteroot]/sites/all/modules/phpfreechat/extras/themes
    [theme] => drupal
    [server_script_url] => http://[mysiteurl]/collaboration/sites/all/modules/phpfreechat/handler.php
    [server_script_path] => [mysiteroot]/sites/all/modules/phpfreechat/handler.php
    [cmd_path] => [mysiteroot]/sites/all/modules/phpfreechat/extras/commands
    [language] => en_US
    [frozen_nick] => 1
    [isadmin] => 1
    [firstisadmin] => 
    [title] => Chat with Everyone
    [channels] => Array
        (
            [0] => Everyone
        )

    [islocked] => 
    [quit_on_closedwindow] => 
    [focus_on_connect] => 1
    [connect_at_startup] => 1
    [start_minimized] => 
    [nickmarker] => 1
    [clock] => 1
    [startwithsound] => 1
    [openlinknewwindow] => 1
    [notify_window] => 1
    [short_url] => 1
    [display_ping] => 1
    [display_pfc_logo] => 1
    [displaytabimage] => 1
    [displaytabclosebutton] => 1
    [showwhosonline] => 1
    [showsmileys] => 1
    [btn_sh_whosonline] => 1
    [btn_sh_smileys] => 1
    [debug] => 1
    [get_ip_from_xforwardedfor] => 
    [nick] => admin
    [serverid] => de2958f2d346631a5ecba7ae5f1bbe11
    [nickmeta] => Array
        (
            [drupal_base_url] => http://[mysiteurl]/collaboration
            [drupal_user_uid] => 1
            [away] => no
        )

)

Session: Array
(
    [node_overview_filter] => Array
        (
        )

    [pfcuserconfig_21928ca2a0f2f3301a31b623418f7140_nick] => 
    [pfcuserconfig_21928ca2a0f2f3301a31b623418f7140_active] => 
    [pfcuserconfig_21928ca2a0f2f3301a31b623418f7140_channels] => Array
        (
        )

    [pfcuserconfig_21928ca2a0f2f3301a31b623418f7140_privmsg] => Array
        (
        )

    [pfcuserconfig_36c4536996ca5615dcf9911f068786dc_nick] => 
    [pfcuserconfig_36c4536996ca5615dcf9911f068786dc_active] => 
    [pfcuserconfig_36c4536996ca5615dcf9911f068786dc_channels] => Array
        (
        )

    [pfcuserconfig_36c4536996ca5615dcf9911f068786dc_privmsg] => Array
        (
        )

    [pfcuserconfig_de2958f2d346631a5ecba7ae5f1bbe11_nick] => 
    [pfcuserconfig_de2958f2d346631a5ecba7ae5f1bbe11_active] => 
    [pfcuserconfig_de2958f2d346631a5ecba7ae5f1bbe11_channels] => Array
        (
        )

    [pfcuserconfig_de2958f2d346631a5ecba7ae5f1bbe11_privmsg] => Array
        (
        )

)

Cookies: Array
(
    [__utmz] => 71585348.1233085696.70.5.utmcsr=[mysiteurl]|utmccn=(referral)|utmcmd=referral|utmcct=/
    [SESS62c629d5e954b36011cb06661d218f2b] => dn6t4vijj2vg75gvkg7euegmc1
    [__utma] => 71585348.2779857296880561700.1225730383.1239638320.1239646647.109
    [SESS1e06ffc482d3759a1de624d2bcb70cbc] => c8sppnj69l2jcub7ge5ig8qgl2
    [SESSa47bcd5878f439884de10d4bf6923e96] => 01bfug48rtk6ildfvvkprsaco4
    [SESScd0d43e28ed1a23ba4285d07db5366a8] => h8tkn0apo0vtmd20pql8lp7uc1
    [SESS5a47c1d2f79ab09e8cfd6531c9a780d5] => ir1a486bf34eg6fe9dtnnimi16
    [has_js] => 1
    [phpfreechat] => vnvhjbk4m2rbgn19f28r6nind3
)

Any suggestion about what is going on and how to fix it would be really useful.
Thanks!
Kasia

socialnicheguru’s picture

Status: Active » Closed (fixed)

FIXED IT FOR D.10

1. move files to sites/files (I does not load in sites/default. If someone knows how to change that I would greatly appreciate it).
2. make sure that display_error = Off in your php.ini file
3. $Scripts variable must be at the top of page.tpl.php

Marko B’s picture

no its not, i never had any version of chat, tried it localy and online and had same CHAT LOADING.... message, try different settings, even on blank drupal 6.10 it doesnt work and something is bothering this chat. permissions were set to 777 also for its directory in "files" giving up for now on this chat...

permutations’s picture

Delete cookies, delete cache, close browser, and relaunch.

kasiawaka’s picture

Status: Closed (fixed) » Active

This was my first installation on clean Drupal 6.10 and as described above, wasn't working.

I cleaned cache, cookies and relauched browser - nogo. Also, changed the theme to Garland - nogo.

Too bad, because the module seems to be what I need.

permutations’s picture

The module was tested with Drupal 6.9. I wouldn't be the least surprised if the Drupal developers made changes in 6.10 that broke modules for Drupal 6.9. They do this with almost every version. Frankly, if I'd realized this was how Drupal was run, I would never have installed it on any of my sites - it's a terrible policy. They waste vast amounts of people's time breaking everything with every version.

I'm not saying this is your problem for sure, but it's possible.

Marko B’s picture

...delete chat :-PPP

p.s.
sorry maybe 6.9 is working i dont know, this is first time that some module isnt backwards compatible, maybe because contributers upadte their modules, chat looks fine but i am trying TRIBUNE module instead.

Charlie Sibbach’s picture

Status: Closed (fixed) » Active

I'm getting this problem. I'm on a relatively fresh 6.11 install (CCK+Views+LDAP only). I've installed the module, created a content type, all the normal steps, and get stuck at Chat Loading, Please Wait.

I've tried completely uninstalling the module, clearing cookies and cache, restarting the browser, etc (all at the same time, too). I've set the base URL in settings.php. I deleted my chat nodes. Still no go.

Any advice beyond what's already been covered? I do need this (or a similar module) that can support multiple chat rooms, preferably on a per-node basis, and flashchat doesn't seem to do that. Any recommendations?

totocol’s picture

I tried lots of different things on 6.11 but nothing is helping. Not sure what else to do. If anyone gets it working on 6.11 please advise.

Charlie Sibbach’s picture

I finally gave up on using this via the module- but not on phpFreeChat itself. I installed PFC via the simple setup into the root of my Drupal installation, and then embedded the chat room into my node template. A little playing with params and it works just fine; spent A LOT less time making it work on it's own than I did with the module.

Love the idea behind the module, BTW; I'm not trying to put it down in any way shape or form. Out of all the chat modules out there, this one is by far the best (and I tried EVERY chat module in my quest). I believe that is does work, at least up to 6.9 or so. Has anybody had any success with the latest releases, D6.10 and D6.11?

totocol’s picture

Thanks Charlie

I think that is what I am going to try next.

Any parameter in particular I should be aware of that you had to change to make it work?

MGParisi’s picture

One chat program not on the list is FlashChat, it integrates well and it also is faster...

The defualt drupal module here, doesnt work, instead google flashchat drupal.

The problem is PHPFreeChat the program. The module developers are amazing. They just cant fix all of these issues since JQuerry iis a conflict with phpfreechat.

totocol’s picture

Hi Charlie,

I am not that experiences with php so just want to double check if this is the right procedure to embed the chatroom in an node:

- Create a new node
- Create a nw tpl.php page-node-newnodenumber.tpl.php
- Copy from index.php the following part:

<?php if (file_exists(dirname(__FILE__)."/checkmd5.php")) { ?>
            <li>
              <a href="checkmd5.php">Check md5</a>
            </li>
            <?php } ?>

- Open the required node

I am feeling there should be more than that involved. Would you be able to guide me?

Thanks a lot in advance for any help

Charlie Sibbach’s picture

I created a node template (node-chat.tpl.php, so it works on all chat nodes, for example). At the top of the template, I included this:

require_once "/path/to/www-where-drupal-is/pfc/src/phpfreechat.class.php"; // adjust to your own path
  $params["serverid"] = md5($node_url); // used to identify the chat
  $params["nick"] = $user->name;
  $params['title'] = $title;
  $params['channels'] = array($title);
  $chat = new phpFreeChat($params);

And then where I want the chat box to appear,

    <?php $chat->printChat(); ?>
  

Nothing more to it. You can get creative if you want with which template you put it in.

BleuBiRTH’s picture

just to inform you all: My posts above are about Drupal 6.10, so this module works fine also with Drupal 6.10!

Manonline’s picture

after fight with my installation, the module worked for me not in one... in three drupal installations!!! 2 drupal 6.11 and 1 6.12.. 6.11 in linux centos server and 6.12 in win xp sp3. I just followed the instructions in the right order.

thanks permutations!!

www.planetaprodental.com
www.marianorenzi.com.ar

eme’s picture

After a long struggling with this module, I've changed the permissions to 0777 (if it is not the case) for the files that are in site/default/files and it seems to work now... You can see if it works as well for you.

For IE 9, you must ask your users to go to tools - > Select Compatibility View Settings.

Complentary remark : if it does not load, try with (or without) the "www".

discontent619’s picture

If you are having this problem try to set the base_url in settings.php to http://yourwebsite.com instead of http://www.yourwebsite.com.

I have not tested this in all browsers but it works for ie7 - 8, firefox 2-3, and chrome. I have not tested this on opera, navigator or safari.

jomorlo’s picture

Hi,

a solution just for me... I put at my site a PFC in a primary menu, after I created a node, of course.

The url was http://www.mydomain.com/chat

Since my based_url is http://mydomain.com, it doesn't work, so I have just changed the url from tha primary menu to:

http://mydomain.com/chat.

By the way, it has been a silly mistake but now it works...

DLZJ’s picture

HI jomorlo,

How can we change "based url"? I can't find it.....

How shall I configure it..?

Thanks.

Best Regards,
Dennis

eme’s picture

In your file settings.php (see site->default->settings.php), you type $base_url = 'http://example.com';
Some other examples are shown in the file itself that you can uncomment (search for $base_url in your settings.php). In mine it is line 117 or so.

Ole Martin’s picture

I have this module on 2 pages. On the one hand it seems fine on the other not. I solved it by deleting the
.... / sites / all / modules / phpfreechat
.... / sites / default / files / phpfreechat
and simultaneously delete phpfreechats table in the database. The module was also erased in the "System" table. Installed it again as usual and everything seemed fine now

podarok’s picture

It helps me...
putting phpfreechat into drupal root directory
and creating 'chat' content type +
node-chat.tpl.php

<?php
require_once "C:\WWW\www\voteviews\phpfreechat\src\phpfreechat.class.php"; // adjust to your own path
  $params["serverid"] = md5($node_url); // used to identify the chat
  $params["nick"] = $user->name;
  $params['title'] = $title;
  $params['channels'] = array($title);
  $params['language'] = 'ru_RU'; // adjust to your own locale
  $params['theme'] = 'drupal'; //theme adjusting
  $params['display_pfc_logo'] = false;
  $chat = new phpFreeChat($params);
...............

and adding

.....
<div class="content">
    <?php print $content ?>
	 <?php $chat->printChat(); ?> <!-- this code added for chat box displaying -->
  </div>
.....

really works for me
With a small additions we can put some permissions into this template for making possible to access chat only registered users