Closed (fixed)
Project:
phpFreeChat integration
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Mar 2007 at 14:35 UTC
Updated:
27 Dec 2007 at 10:01 UTC
Dear friends,
I've just installed the phpfreechat module, but I can't activate it, or I get the following error:
Please correct these errors:
* 'serverid' parameter is mandatory by default use 'md5(__FILE__)' value
I am using Drupal 5.1 - if anyone can help, it would be most appreciated.
Comments
Comment #1
farnsworth commentedI have the same error now clue yet but i will post back if i figure it out.
Comment #2
jasonyoung commentedI'm also having the same issue. I partially fixed it by adding the base_url option under settings.php. However, I discovered that if I tried to go to the https: version of my site I would get the same error.
Comment #3
jasonyoung commentedI was able to get around the https issue by placing the full http url in the menu entry I created for phpfreechat.
Comment #4
ray007 commentedI had, the same problem, setting $param['serverid'] in handler.php fixed it.
Now I'm having other issues - maybe phpfreechat 1.0 beta 10 does have some problems ...
Comment #5
harrisou commentedRay-- can you be a little more explicit on how you fixed the error?
From your comment, I dont see:
$param['serverid']
From the code:
What did you exactly change? Thanks in advance!
Comment #6
ray007 commentedAfter the line
$params['channels'] = explode(',', $params['channels']);I inserted a line
next I had to update the permissions of the data-directory, so the module can write in there.
and now the chat starts fine, but there seems to be a problem with the timeout mechnism, and firebug shows me hundreds of concurrent xajax calls - so I assume something with the parameters goes very wrong, since the timeout value is also a parameter ...
Maybe I'll find some time for more debugging tomorrow.
Comment #7
ray007 commentedThe beta-9 works a little bit better than beta-10, at least I did manage to send a few messages.
When setting refresh_delay and timeout myself in the settings, phpfreechat complained that those parameters need to be positive numbers - which is strange since I set the same values that are default.
One problem I had with both versions of phpfreechat, is that the smiley-icons didn't show properly but were html-escaped strings.
Currently something in phpfreechat complains about an unknows function pxlog() on the javascript side, so far I haven't really managed to get it all working embedded in the drupal site.
Calling http://my.site.com/sites/all/modules/phpfreechat/phpfreechat/ works fine.
I'd appreciate any help in getting this running.
Comment #8
hectorplus commentedGetting the same error.
Comment #9
idej commentedSame problem: servid should be set to md5(_FILE_). Using 5.x Drupal
- has there been a patch for this yet?
Comment #10
idej commentedI believe I have a fix for this problem. Go to the pfcglobalconfig.class.php file in sites/all/modules/phpfreechat/phpfreechat/src/. This is where the serverid is set - clearly it has not been set in the params["serverid"] array so set it needs to be set manually as follows:
// check the serverid is really defined
if (!isset($params["serverid"])){
//$this->errors[] = _pfc("'%s' parameter is mandatory -- so using default: '%s' value", "serverid", "md5(__FILE__)");
$params["serverid"]= md5(__FILE__);
$this->serverid =$params["serverid"];
}
else
$this->serverid = $params["serverid"];
The above is a code fragment that replaces the equivalent lines in the file. You then need to go to each content type and enable it for chat as required. I have noticed that it all works very well with IE 6 but Firefox (latest) seems to have a number of issues that need fixing e.g. excessive ajax posts from the xajax.js script ; BOLD is not working properly for chat data and a flickering logo on hover. The latter need some more investigation. In IE the results are great and many thanks to those who developed this code.
Comment #11
ray007 commentedI think if possible we should try to avoid changing phpfreechat code itself and keep the changes to the module.
I have noticed the excessive ajax call in firefox, but they don't happen when I call phpfreechat directly, and not through the module, so ...
And your findings seem to point to the same conclusion: we have a problem getting the parameters set in the module to the phpfreechat script.
Comment #12
idej commentedI agree entirely - but I tried your change to the handler.php file with no success - this made me look lower down the stack.
The ajax calls in firefox seem to be debug and it should be possible to stop them. I need to try this however. The odd thing is that I do not see this in IE.
Comment #13
idej commentedInvestigating the AJAX posts reveals that both IE and Firefox behave the same - you can use MS Fiddler to see the calls in IE. The posts are in fact a design feature and not a bug - they are a "ping" that keeps alive the connection between the client and server and makes sure the server is still running - indeed the elapsed time for the ping is displayed in the chat box with a css class called pfc_ping. What would be good would be to reduce their frequency which seems too high. I don't think the rate will scale with many clients pumping out HTTP posts to the server. I have not found out how to lower the rate yet.
Comment #14
owen barton commented@idej - there is a parameter (on the settings page) to control the rate. The server should be able to withstand a high number of these because the amount of php loaded and run for each request is very small, as is the request and the response in terms of Kb.
Comment #15
owahab commentedComment #16
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.