• 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

Timeout at connect

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

Post a reply
13 posts • Page 1 of 1

Postby Cris77 » Fri Mar 10, 2006 3:54 am

hello, i've just installed the script in my website:
http://www.gettincool.com/freechat/phpfreechat-0.8/

i chmodded as request, but at the moment of connect (both IE and FF) the chat disconnect me with timeout and reapeat it again and again...

what can be?

thanks
Cris77
Member
 
Posts: 11
Joined: Fri Mar 10, 2006 3:47 am
Top

Postby phpfreechat » Fri Mar 10, 2006 9:42 am

I suspect a problem with "touch" or "filemtime" function on your system.
To help to identify the problem, could you create and execute this little script ?
Code: Select all
<?php
$filename = "/tmp/pfc_test";
touch($filename);
$time1 = filemtime($filename);
clearstatcache();
sleep(2);
touch($filename);
$time2 = filemtime($filename);

echo "time1=".$time1."<br>";
echo "time2=".$time2."<br>";
echo ($time2-$time1 == 2) ? '<span style="color:#0F0">touch and filemtime are working on this system</span>' : '<span style="color:#F00">touch and filemtime are NOT working on this system</span>';
?>
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Cris77 » Fri Mar 10, 2006 5:16 pm

Done

time1=1142007298
time2=1142007300
touch and filemtime are working on this system

what now?
Cris77
Member
 
Posts: 11
Joined: Fri Mar 10, 2006 3:47 am
Top

Postby phpfreechat » Fri Mar 10, 2006 6:47 pm

humm, could you try this script :
Code: Select all
<?php
$filename = "/tmp/pfc_test";
touch($filename);
$time1 = filemtime($filename);
clearstatcache();
sleep(2);
$exists = file_exists($filename);
touch($filename);
$time2 = filemtime($filename);

echo "time1=".$time1."<br>";
echo $exists ? "file is alive" : "file has been deleted!";
echo "time2=".$time2."<br>";
echo ($time2-$time1 == 2) ? '<span style="color:#0F0">touch and filemtime are working on this system</span>' : '<span style="color:#F00">touch and filemtime are NOT working on this system</span>';
?>

I try to understand why the nicknames files has been deleted.

However, this demo works :
http://www.gettincool.com/freechat/phpf ... memory.php
(it uses a memory container rather than the default container)
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Cris77 » Sat Mar 11, 2006 3:52 am

thanks, you are so gentle...
here the results:

time1=1142045213
file is alivetime2=1142045215
touch and filemtime are working on this system

i tried the demo you said... it works right!
maybe i can base all my chat on it...
but i remain curious about why don't work the normal chat on my system...
Cris
Cris77
Member
 
Posts: 11
Joined: Fri Mar 10, 2006 3:47 am
Top

Postby Cris77 » Mon Mar 13, 2006 1:58 am

i tried again the mod "shared memory" and i noticied that dont work well with IE. With firefox all is ok... but with IE the main field sometimes disappear and when i click on the smile or ures buttons the smile and user windows disappear and never re-appear when i click again on buttons...

I've just now fresh reinstalled all the package... but nothing is changed...

with the "shared memory" demo the timeout problem is gone, but the interface seem unusable with Internet Explorer...
Cris77
Member
 
Posts: 11
Joined: Fri Mar 10, 2006 3:47 am
Top

Postby Bernhard J. M. Grün » Mon Mar 13, 2006 8:39 am

I don't know what the SharedMemory container can do with the client interface. I have no IE to test it but I think it should work in the same way as the File container works.

Bernhard
Bernhard J. M. Grün
Member
 
Posts: 13
Joined: Thu Feb 23, 2006 3:42 pm
Location: Püttlingen, Saarland, Germany
  • Website
  • ICQ
Top

Postby phpfreechat » Mon Mar 13, 2006 9:16 am

Bernhard is right, the container do not touch the client interface, it just store data.

The IE6 bug you spoke about is a strange display bug I was not able to fix yet.
However I noticed that the bug doesn't occurs when the chat is integrated into an existing webpage which has it's own loaded CSS stylesheet (as an example the official demo works well because it has other CSS file loaded).
Thanks to IE6 for these strange behavirous ...
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Cris77 » Mon Mar 13, 2006 10:59 am

well, good news...
now i try to integrate in a page of my website that have its own CSS...
but, another question:
i noticed the code
<?php $chat->printJavascript(); ?>
<?php $chat->printStyle(); ?>
inserted in <head></head>

my website is template based, so i have some .tpl files that contain the html of the central field of a page... i will insert the chat only in one page not in all pages, if i insert that codes inside <head> tags that javascript is called in the HTML of every page of my website. Can this give problems or slow down my website?
Is possible to insert that code in another position? Possibly in the <body> tags?

thanks
Cris77
Member
 
Posts: 11
Joined: Fri Mar 10, 2006 3:47 am
Top

Postby mehka » Tue Mar 14, 2006 2:49 pm

Hello

I have exactly the same problem with frequntly timeouts.
When a user gets connected, he will be almost instantly disconnected and disconnection messages will be repeatedly printed to screen.

When I ran the above script, the result was:

time1=1142343412
file is alivetime2=1142343414
touch and filemtime are working on this system

Dirs are chmodded as they should. The same phpfreechat configuration works on my testserver (debian) but not with the FreeBSD, where I intent to use it.

I am not able to use the memory container with my host.

Thank you for your help.
mehka
New member
 
Posts: 2
Joined: Tue Mar 14, 2006 2:37 pm
Top

Postby mehka » Wed Mar 15, 2006 8:50 am

mehka wrote:Hello

I have exactly the same problem with frequntly timeouts.
When a user gets connected, he will be almost instantly disconnected and disconnection messages will be repeatedly printed to screen.

When I ran the above script, the result was:

time1=1142343412
file is alivetime2=1142343414
touch and filemtime are working on this system

Dirs are chmodded as they should. The same phpfreechat configuration works on my testserver (debian) but not with the FreeBSD, where I intent to use it.

I am not able to use the memory container with my host.

Thank you for your help.

I found out that the time() function returned value is about 200 seconds ahead (compared to filemtime) in the non-working environment. Perhaps this is a filesystem issue in the particular system. I fixed the problem by modifying the phpfreechatfilecontainer.class.php:

original:
if (time() > (filemtime($c->container_cfg_nickname_dir."/".$file)+$c->timeout/1000) ) // user will be disconnected after 'timeout' secondes of inactivity

modified:
if (time() > (filemtime($c->container_cfg_nickname_dir."/".$file)+200+60) ) // user will be disconnected after 60 seconds of inactivity
mehka
New member
 
Posts: 2
Joined: Tue Mar 14, 2006 2:37 pm
Top

Postby phpfreechat » Wed Mar 15, 2006 10:27 am

:|
This behaviour is really strange ! it means that when a file is touched (using the 'touch' command), the new file time is not equal to the current system time...
I don't know why ! and it will complicate the autodetection process ... :(

However thank you for this clear investigation, it helps to completly understand the problem!
I will add a related bug in the buglist.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Booner » Sun Dec 09, 2007 1:25 am

I have touch on my server but cannot locate filemtime. Could this be the cause of IE 6+ timing out on the users?

- Booner

Edit: I ran the script above and it seems filemtime is on my system; just not access-able to me with locate for some reason.

Script output:

time1=1197160046
file is alivetime2=1197160048
touch and filemtime are working on this system
Last edited by Booner on Sun Dec 09, 2007 1:28 am, edited 1 time in total.
Booner
New member
 
Posts: 4
Joined: Tue Dec 04, 2007 8:22 pm
Top


Post a reply
13 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

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