• 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

Error: the XML response that was returned from the server is

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

Post a reply
22 posts • Page 1 of 2 • 1, 2

Postby peyote » Sun Aug 13, 2006 4:23 pm

I got the lates 1.0Beta4 installed with the simple config from the INSTALL file.
I get the following error:


Error: the XML response that was returned from the server is invalid.
Received:
<?xml version="1.0" encoding="utf-8" ?><xjx><cmd n="js"><![CDATA[pfc.handleResponse('connect', 'ok', '');]]></cmd></xjx>
You have whitespace in your response.
peyote
New member
 
Posts: 3
Joined: Sun Aug 13, 2006 4:02 pm
Top

Postby phpfreechat » Sun Aug 13, 2006 9:40 pm

please could you give me the public url of your chat ?
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby peyote » Sun Aug 13, 2006 11:41 pm

I modified the index.php: removed all comments, removed all whitespaces and all empty lines and now it works :) Very strange, but it works now.
didnt change any code in index.php just removed blanks and comments.
peyote
New member
 
Posts: 3
Joined: Sun Aug 13, 2006 4:02 pm
Top

Postby phpfreechat » Mon Aug 14, 2006 8:57 am

Did you have some blanks before the first <?php tag ? it could explain the problem.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby edpollard » Tue Aug 15, 2006 6:11 pm

I'm seeing a similar issue but the error window that responds has the contents of my login page's html,

why is the page parsing the page that lead to the chat? none of that page's content is at all interesting to pfc.

I did add some php to the top that checks to see if you have logged in and redirects if not , that all works... the problem is once it passes my html it appears to be using passing back to the browser the html for my login page as an xml entity to parse.. I can't figure out why...
edpollard
New member
 
Posts: 6
Joined: Mon May 15, 2006 10:05 pm
Top

Postby edpollard » Tue Aug 15, 2006 6:35 pm

forget that i found the answer in anotehr post .. had to break it up into a client and server .. still having problems getting THAT to work but this error is gone..
edpollard
New member
 
Posts: 6
Joined: Mon May 15, 2006 10:05 pm
Top

Postby Waxime » Mon Aug 21, 2006 5:13 am

i have exactly the same error, but i not find the solution
please help me
Image

http://travian3.game-server.cc:8080/chat/index2.php
Code: Select all
<?php
require_once
dirname(__FILE__)."/src/phpfreechat.class.php";

$params["serverid"]      = md5(__FILE__);
$params["language"]      = "fr_FR";

$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>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>phpFreeChat demo</title>

    <?php $chat->printJavascript(); ?>
    <?php $chat->printStyle(); ?>

  </head>

  <body>
    <?php $chat->printChat(); ?>
  </body>
</html>

but all form of the chat give the same error

http://travian3.game-server.cc:8080/chat/index.php
Last edited by Waxime on Mon Aug 21, 2006 6:09 am, edited 1 time in total.
Waxime
New member
 
Posts: 9
Joined: Mon Aug 21, 2006 5:05 am
  • Website
Top

Postby phpfreechat » Mon Aug 21, 2006 8:34 am

please wait for 1.0-beta5 it will fix the problem.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Waxime » Mon Aug 21, 2006 2:34 pm

thank you .... when lol
Waxime
New member
 
Posts: 9
Joined: Mon Aug 21, 2006 5:05 am
  • Website
Top

Postby phpfreechat » Mon Aug 21, 2006 4:05 pm

In a fwe days, maybe this weekend.
I must finalize some test before release it.

But you can checkout the development sources from subversion if you are hurry.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Waxime » Mon Aug 21, 2006 4:07 pm

thank you
i go to vacation during 1½ week. I'm ok to wait
Waxime
New member
 
Posts: 9
Joined: Mon Aug 21, 2006 5:05 am
  • Website
Top

Postby bmorley » Tue Aug 22, 2006 3:47 am

I experienced this problem when I was trying to run with debug mode on ... It didn't seem to like any of the ajax callbacks. When I removed the debug / ajaxdebug parameters things seemed to work properly. :o
bmorley
Member
 
Posts: 10
Joined: Sun Aug 20, 2006 5:07 am
Top

Postby Waxime » Fri Aug 25, 2006 2:58 am

strange, i try with beta 3 and that make exactly the samething ... exactly the same error

i try with setup.php and not working too
Last edited by Waxime on Fri Aug 25, 2006 3:34 am, edited 1 time in total.
Waxime
New member
 
Posts: 9
Joined: Mon Aug 21, 2006 5:05 am
  • Website
Top

Postby phpfreechat » Fri Aug 25, 2006 8:33 am

In fact it depends on your php.ini errors reporting flag.
So on some server where errore reporting flags is setup to show the warnings, the errors will occurs.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby sillyxone » Fri Sep 01, 2006 6:00 pm

I got the same problem when having two different pages to point to the same serverid. I guess because the original page is stored in the /private/cache, whoever came in later will always send request to the first page.

I worked around the problem by creating a response.php page:

<?php
session_start();

require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["serverid"] = $_SESSION['chat_serverid'];
$chat = new phpFreeChat( $params );
?>


and in phpfreechat.class.php, replace the line:
$this->xajax = new xajax($c->server_script_url.(isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "" ? "?".$_SERVER["QUERY_STRING"] : ""), $c->prefix);

with
$this->xajax = new xajax('./response.php', $c->prefix);


So in the two pages, after setting serverid param, I also set it to $_SESSION['chat_serverid'].

A benefit from this solution is that the load on server will be reduced. Normally my two pages have to verify client id, query database for other information to display. And if the chat keep asking for the same page every 5 seconds, the same routine (verify, query db) repeats every 5 seconds. The response.php page will only handle the chat, no more than that. And because the channel is set internally, it's secured I think.

just my 2 cents, and thank Stephane so much for such a great project.
sillyxone
New member
 
Posts: 2
Joined: Wed Mar 08, 2006 10:48 pm
Top

Next

Post a reply
22 posts • Page 1 of 2 • 1, 2

Return to General Support (v1.x)

Who is online

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