• 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

Session problem integrating with own system.

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

Post a reply
4 posts • Page 1 of 1

Postby iperich » Thu May 26, 2011 1:23 am

Hi, i need to have my app users in a phpfreechat, i'm using the params in my php source code like this:

require_once "src/phpfreechat.class.php"; // adjust to your own path
$params["serverid"] = md5($info['room']); // used to identify the chat
$params["channels"] = array($info['room']);
$params["language"] = 'es_ES';
$params["nick"] = $nickname;
$params["title"] = 'This is '.$info['sala'];
$params["firstisadmin"] = true;
$params["showwhosonline"] = false;
$params["showsmileys"] = false;
$params["height"] = '150';
$params["displaytabclosebutton"] = false;
$params["display_pfc_logo"] = false;
$params["shownotice"] = 0;
$params["startwithsound"] = false;
$params["connect_at_startup"] = true;

$chat = new phpFreeChat($params);

. It works, but sometimes some users enter with no nickname and no room. Its a cache/session/cookie problem.

I have tried changing the nick, i.e. to "Peter" with the /nick command and then enter again. No matter what is in $params["nick"], I always return with nick "Peter", this is, the name saved in the cache/session

It is possible to force the nick / room to the chat object despite the session variables? (It would be great to work without sessions, I don't need them at all)

thanks in advice..!
iperich
New member
 
Posts: 2
Joined: Mon May 23, 2011 6:58 pm
Top

Postby re*s.t.a.r.s.*2 » Thu May 26, 2011 4:56 am

Hi,

How do you pass var $nickname?

If using session then you need to start the session at top, because I dont see any required file that could have initiate it..
So if(isset($_SESSION)){session_start();}
would do the trick..

thanks and regards.
Or
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 iperich » Thu May 26, 2011 6:15 pm

I'm obtaining $nickname from my app, (directly from $_GET), so we can say that $nickname doesn't change. That's what gets me confused. If i do a "echo $nickname" it says the nickname correctly, but $nickname doesn't go into the chat as $params['nick'], but the session saved name. Is weird...
iperich
New member
 
Posts: 2
Joined: Mon May 23, 2011 6:58 pm
Top

Postby re*s.t.a.r.s.*2 » Thu May 26, 2011 10:54 pm

That's because its a know thing about the script.
$_GET array doesn't work with this script, its recommended to use $_SESSION in a page before redirecting to the chat script.. that's how the chat is designed to do...
regards.
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
4 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

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