• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Whos In Chat Doesnt Work

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
6 posts • Page 1 of 1

Postby chatman » Wed Aug 23, 2006 12:30 am

Can Someone Look at This And Tell Me What Im Doing Wrong


This Is My Chat
--------------------------------------

<?php
require_once dirname(__FILE__)."/../src/phpfreechat.class.php";

$params = array("title" => "My room",
"max_msg" => 0,
"prefix" => "blune_",

"showwhosonline" => true,
"showsmileys" => true,
"height" => "300px",
"width" => "100%",
"serverid" => md5(__FILE__),
"theme" => "blune",
);
$chat = new phpFreeChat( $params );
?>
<center><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>MCM2 Racing</title>
<?php $chat->printJavascript(); ?>
<?php $chat->printStyle(); ?>



<?php $chat->printChat();

?>

</body>
</html>
---------------------------------------

This Is My Whois.php
---------------------------------------


<?php

require_once dirname(__FILE__)."/../src/phpfreechat.class.php";
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["title"] = "";
$pfc_config =& pfcGlobalConfig::Instance( $params );

?>

<?php

require_once dirname(__FILE__)."/../src/pfcinfo.class.php";
$info = new pfcInfo( md5("Whois online demo") );
// NULL is used to get all the connected users, but you can specify
// a channel name to get only the connected user on a specific channel
$users = $info->getOnlineNick(NULL);

echo "<h1>Racers</h1>";

echo '<div style="margin: auto; width: 10%; background-color: green; padding: ;">';
$info = "";
$nb_users = count($users);
if ($nb_users <= 1)
$info = "<strong>%d</strong> In Room !";
else
$info = "<strong>%d</strong> In Room !";
echo "<p>".sprintf($info, $nb_users)."</p>";

echo "<p>' list:</p>";
echo "<ul>";
foreach($users as $u)
{
echo "<li>".$u."</li>";
}
echo "</ul>";
echo "</div>";

?>


------------------------------------

This Is The Message im Getting


------------------------------------

Warning: mkdir(/nicknames): Permission denied in /src/pfctools.php on line 122

Warning: opendir(/nicknames): failed to open dir: No such file or directory in /src/containers/file.class.php on line 388

Warning: readdir(): supplied argument is not a valid Directory resource in /src/containers/file.class.php on line 389


0 In Room !

' list:
chatman
New member
 
Posts: 2
Joined: Wed Aug 23, 2006 12:25 am
Top

Postby softwareNerd » Wed Aug 23, 2006 2:06 am

Check out this thread. http://www.phpfreechat.net/forum/viewtopic.php?id=126
softwareNerd
Member
 
Posts: 17
Joined: Thu Feb 23, 2006 4:00 pm
Top

Postby phpfreechat » Wed Aug 23, 2006 8:42 am

chatman,
the problem is around you serverid value.

In your script chat, you are using :
$params["serverid"] = md5(__FILE__);

In your Whois.php script, your are also using :
$params["serverid"] = md5(__FILE__);

This is wrong!

Server id will be different because __FILE__ is a constant which is replaced byt the absolute path of your current file.

You need to define your own serverid, for example :
$params["serverid"] = md5("MCM2Racing");
Put this server id in the two files.

keep me informed.

regard,
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby chatman » Wed Aug 23, 2006 3:20 pm

kerphi = GOD
Yes that was my problem, Thanks :) It works great now.
chatman
New member
 
Posts: 2
Joined: Wed Aug 23, 2006 12:25 am
Top

Postby BenJMann » Mon Sep 25, 2006 7:18 pm

When you say to define your own serverid, is this my site address or name? I'm not sure what is meant by serverid?

You need to define your own serverid, for example :
$params["serverid"] = md5("MCM2Racing");
BenJMann
Member
 
Posts: 18
Joined: Mon Apr 24, 2006 2:12 pm
Top

Postby phpfreechat » Mon Sep 25, 2006 7:39 pm

a serverid is a simple string used to identify the chat.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top


Post a reply
6 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 29 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub