miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Bugs miniBB Support Forums / Bugs /  
 

whosonline unexpected character?

 
Author Guest
~
#1 | Posted: 25 Nov 2008 23:06 
I just got home and all I saw on my forum was this? Have any idea what might have caused it? My whosonline directory was full of temp files that I couldn't read. The whosonline_data file $w_logged_users= array was chopped in half and didn't have an ending ));

Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/mine/forum.mysite.com/whosonline/addon_whosonline_data.php on line 3

Parse error: syntax error, unexpected $end, expecting ')' in /home/mine/forum.mysite.com/whosonline/addon_whosonline_data.php on line 3

Author Paul
Lead Developer 
#2 | Posted: 26 Nov 2008 04:25 
Well, we know about this bug, but unfortunately nobody still is able to say where it comes from (previously it happened occasionally on projects of our customers, but never happened to us).

In many cases it could be related to your server gone "bad" for some reason. Whatever you need to do in that case, is to delete addon_whosonline_data.php file completely.

Author tom322
Active Member
#3 | Posted: 26 Nov 2008 09:04 
Hmm, maybe post #9 in this thread will be helpful: http://www.sugarcrm.com/forums/showthread.php?p=121876

Author Guest
~
#4 | Posted: 26 Nov 2008 22:08 
What I gather from the site is someone is trying to access the addon_whosonline_data.php file directly while its being updated by another user and causes the syntax error.

What if I rename the addon_whosonline_data.php and fix where its called so the end user trying to play around with it directly really has no idea where it is? Would this work? I will try.

Author Paul
Lead Developer 
#5 | Posted: 27 Nov 2008 03:19 
Guest:
What I gather from the site is someone is trying to access the addon_whosonline_data.php file directly while its being updated by another user and causes the syntax error.
This process actually happens instantly on your forums page ;-) That's why in the add-on's core, there is implemented a "rename" command, which renames a copy of that data file before updating it. It's the fastest function operational system can handle.

If there are problems like you described, it only could mean at some point your server has a break and didn't get the renaming/updating the file properly. Why it happened? Who knows...

How much users instantly online do you have on your forums btw?

Author Guest
~
#6 | Posted: 27 Nov 2008 08:41 
I average around 20-30 users on at one time. 250 visit a day.

It renames the temp data files but addon_whosonline_data.php stays the same right? Without looking at the code I am guessing it creates a temp file at random then replaces addon_whosonline_data.php with the data? I renamed addon_whosonline_data.php just incase someone was trying to access that file at the same time it was being replaced, now they won't know what the data file is. (or am I still lost) :)

Author Paul
Lead Developer 
#7 | Posted: 27 Nov 2008 11:01 
Such amount of users is a tiny one, but still may produce something undesirable.

As I mentioned earlier, you can delete addon_whosonline_data.php completely, and it should be automatically re-created again.

Guest:
they won't know what the data file is
They - who? :-) It couldn't be related to hacking at all, it could be a server's mistake on disk, for example. Trust me or not, that happens sometimes ;-)

Renaming process in this add-on: look in the function writeFile(). First it creates a temporary file with the newest data array of users, then renames it by addon_whosonline_data.php (in that process, older version of 'addon_whosonline_data.php' is deleted automatically).

Author tom322
Active Member
#8 | Posted: 27 Nov 2008 11:34 
In fact I only had one problem with this addon - and it was caused by the server indeed (I had somewhat old or corrupted php.ini file - you can check that or rewrite this file on your server).

Bugs miniBB Support Forums / Bugs /
 whosonline unexpected character?
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑