• 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

Problem with include and relativePath function

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

Post a reply
3 posts • Page 1 of 1

Postby TBoris » Wed Jun 21, 2006 9:43 am

Hi all

I try to integrate PhpFreeChat version 0.9.3 in a website and I have some problem with the include function.
Here is my HTML code with some PHP :
require_once "src/phpfreechat.class.php"; // pensez à ajuster le chemin
$params=array();
$params["serverid"] = $_POST['id']; // permet d'identifier ce chat
$params["nick"] = $_POST['nick']." (".$_POST['metier'].")";
$params["title"] = $_POST['nomforum'];
$params["showsmileys"] = false;
$params["width"] = "800";
$chat = new phpFreeChat($params);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><?echo($_POST['nomforum']);?></title>
<?
echo("<pre>");
var_dump($params);
echo("</pre>");
$chat->printJavascript();
$chat->printStyle();
?>
</head>
<body><?
$chat->printChat();?>

</body>
</html><?

Here are the errors returned by PHP :

PHP Warning: include(eb/pp.tropheeruinart.com/ftp/home/fr/chatajax/themes/default/templates/pfcclient-custo.js.tpl.php) [function.include]: failed to open stream: No such file or directory in D:webpp.tropheeruinart.comftphomefrchatajaxthemesdefaulttemplatespfcclient.js.tpl.php on line 959 PHP Warning: include() [function.include]: Failed opening 'eb/pp.tropheeruinart.com/ftp/home/fr/chatajax/themes/default/templates/pfcclient-custo.js.tpl.php' for inclusion (include_path='.;C:php5pear') in D:webpp.tropheeruinart.comftphomefrchatajaxthemesdefaulttemplatespfcclient.js.tpl.php on line 959 PHP Warning: include(eb/pp.tropheeruinart.com/ftp/home/fr/chatajax/themes/default/templates/chat.js.tpl.php) [function.include]: failed to open stream: No such file or directory in D:webpp.tropheeruinart.comftphomefrchatajaxthemesdefaulttemplateschat.html.tpl.php on line 83 PHP Warning: include() [function.include]: Failed opening 'eb/pp.tropheeruinart.com/ftp/home/fr/chatajax/themes/default/templates/chat.js.tpl.php' for inclusion (include_path='.;C:php5pear') in D:webpp.tropheeruinart.comftphomefrchatajaxthemesdefaulttemplateschat.html.tpl.php on line 83

I'm using IIS server on a Windows Server !
I think there is a problem with the relativePath function because we can see that the relative path isn't well calculated !
What can I do ?

Thanks in advance !

Thibault
TBoris
New member
 
Posts: 2
Joined: Wed Jun 21, 2006 9:36 am
Top

Postby TBoris » Thu Jun 22, 2006 3:28 pm

I ask me a question !
Why can't I choose my nick name configuring the chat like this :

$params["nick"] = $_POST["nick"];

Like in my previous post !

It always ask me to enter a nickname ?
TBoris
New member
 
Posts: 2
Joined: Wed Jun 21, 2006 9:36 am
Top

Postby phpfreechat » Thu Jun 29, 2006 7:58 am

This is dangerous to use _POST array because Ajax makes asynchronous calls and the _POST array is not defined when it does that.
Could you store these informations into the _SESSION array ?
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top


Post a reply
3 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 13 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