• 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

XML Error

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

Post a reply
5 posts • Page 1 of 1

Postby kidsareheroes » Sat Nov 27, 2010 9:00 pm

Hi,

I need to add code just before entering chat to check a session ID to make sure that the person entering the chat room is authorized. When I do this, I get an error message stating that "Error: The XML response that was returned from the server is invalid..." and it repeats some of the code in front of the chat code. There are no syntax errors.

I place the code in front of "require_once dirname(__FILE__)."/src/phpfreechat.class.php";"

Does anyone know why this is happening or know of another way to verify a user before letting him in?

Thanks,

-Gabe
kidsareheroes
New member
 
Posts: 2
Joined: Sat Nov 27, 2010 8:51 pm
Top

Postby re*s.t.a.r.s.*2 » Sat Nov 27, 2010 9:18 pm

I have created this registration system, that allow guest login (you can disable it), its here http://www.phpfreechat.net/forum/viewtopic.php?id=4678
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby kidsareheroes » Sat Nov 27, 2010 9:24 pm

Hi,

I did see that. I already have most of that set up. All I need is a few simple lines in front like this:

include "myheader.php";
session_start();
$ChatID = $_SESSION['ChatID'];
// can only get here through the twitter authentication process
if ($ChatID == "")
{
MyHeader("http://chat.kidsareheroes.org");
die();
}
session_destroy();

// start of chat code
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
kidsareheroes
New member
 
Posts: 2
Joined: Sat Nov 27, 2010 8:51 pm
Top

Postby re*s.t.a.r.s.*2 » Sat Nov 27, 2010 9:34 pm

ok $ChatID == ""

will redirect you right because is false and I think this is a redirect MyHeader("http://chat.kidsareheroes.org"); rigth?
die(); will not do anything because you are redirecting..

can understand the code very well, can you tell what are you trying to do. o let me talk to you here http://radioscatrachas.info/chat/phpfreechat/
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby re*s.t.a.r.s.*2 » Sat Nov 27, 2010 10:25 pm

session_start();// you are stating the session at this stage
$ChatID = $_SESSION['ChatID']; // how you just statrt it, its not even set with anything..

if ($ChatID == "")// which is allways true, variable has nothing in..
{
MyHeader("http://chat.kidsareheroes.org");
die();
}
session_destroy(); // now lets pose tha you set it somewhere, and the if is not true, the session will be gone

then dont know what would happen with the variable but it will be set with the tweeter ID...
really cant understand the code without looking the whole code...
hope someone with more understanding come to give you a hand with.
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top


Post a reply
5 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 25 guests

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