miniBB ® 

miniBB

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

Who's Online add-on's bug: giving "unexpected T_CONSTANT_ENCAPSED_STRING..."

 
 
Page  Page 1 of 2:  1  2  Next »

Author JohnSims
Partaker
#1 | Posted: 20 Apr 2014 04:05 
Lately, I continue to get "Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/content/j/o/h/johnbsims3/html/shared_files/addon_whosonline_data.php on line 2". Paul advised me to delete the file and it will regenerate itself, which it has. I don't understand why it is happening over again numerous times. Any suggestions appreciated.

Here is the file:

<?php
$w_anonymous_visits=array('-1'=>'1393710661','5929776821393710586'=>'1393710684');
$w_logged_users=array();
$w_record=array('0'=>'2008-10-30 13:50:03','1'=>'45','2'=>'0');
?>

Author Paul
Lead Developer 
#2 | Posted: 20 Apr 2014 16:08 
I would need to see the broken file, it appears that's you provided above is a valid one.
Would it be possible for you to copy the contents right after you get this error?

Author JohnSims
Partaker
#3 | Posted: 20 Apr 2014 16:30 
Yes, will try again when it gives the error. TY!

Author Guest
~
#4 | Posted: 21 Apr 2014 17:08 
OK, I got the message again: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/content/j/o/h/johnbsims3/html/shared_files/addon_whosonline_data.php on line 2

Here is the file text from the 'shared_files' directory:

<?php
$w_anonymous_visits=array('10436482101398074948'=>'1398074978','-1''=>'1398074964');
$w_logged_users=array();
$w_record=array('0'=>'2008-10-30 13:50:03','1'=>'45','2'=>'0');
?>

Author Paul
Lead Developer 
#5 | Posted: 21 Apr 2014 23:21 
Ok, I see it now...

I have updated the core add-on so far, you may get a fresh copy of it and update just the root folder's addon_whosonline.php, not all files...

Also, re-update addon_whosonline_data.php.

Then let me know if you still will get this issue. Obviously, someone is trying to trick your forum with a false cookie set! Not sure about anything else, but the today's update may help... let me know.

Author JohnSims
Partaker
#6 | Posted: 22 Apr 2014 02:35 
thank you! I will let you know.

Author JohnSims
Partaker
#7 | Posted: 29 Apr 2014 04:50 
I now get these errors when performing the above:


Warning: include(/addon_whosonline_data.php) [function.include]: failed to open stream: No such file or directory in /home/content/j/o/h/johnbsims3/html/addon_whosonline.php on line 47

Warning: include() [function.include]: Failed opening '/addon_whosonline_data.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in /home/content/j/o/h/johnbsims3/html/addon_whosonline.php on line 47

Warning: unlink(/addon_whosonline_data.php) [function.unlink]: No such file or directory in /home/content/j/o/h/johnbsims3/html/addon_whosonline.php on line 37

Warning: rename(/tmp/7F1oXD,/addon_whosonline_data.php) [function.rename]: Permission denied in /home/content/j/o/h/johnbsims3/html/addon_whosonline.php on line 38

Warning: chmod() [function.chmod]: No such file or directory in /home/content/j/o/h/johnbsims3/html/addon_whosonline.php on line 41

Author Jaime
Partaker
#8 | Posted: 29 Apr 2014 12:29 
Do you have set $woDir=$pathToFiles.'shared_files'; ... in bb_plugins.php (where you have the addon code.) Look at the documentation of the addon again more closely ;-) I think that according to your error message is a problem with recognizing the variable $woDir exists.

Author JohnSims
Partaker
#9 | Posted: 29 Apr 2014 18:03 
I will double check. TY!

Author JohnSims
Partaker
#10 | Posted: 29 Apr 2014 19:04 
$woDir=$pathToFiles.'shared_files'; is good...
It looks to me like the pgm is no seeing the 'adon_whosonline_data.php' file. I have it set to 777

Author Jaime
Partaker
#11 | Posted: 30 Apr 2014 12:02 
And the directory shared_files set to 750? 777 for the datafile is right. I think you have another problem : ( And if you type $woDir in the path directly in the addon_whosonline.php ... What happens then?

Author Paul
Lead Developer 
#12 | Posted: 30 Apr 2014 15:50 
I'm not sure indeed why it reports

include(/addon_whosonline_data.php)

or did you remove the upfront path intentionally just for posting this message? At least it should report the full path to the script.

If it truly reports just '/addon_whosonline_data.php' it means the script tries to find this file under the ROOT path of your website, and of course it's not there. It means there is some misconfiguration with the path to this file; this is what Jaime was meaning obviously, i.e. $woDir setting.

Obviously, you may also try to set the 'shared_files' folder to have 777 permissions. 750 may be not enough on some configurations.

Author Paul
Lead Developer 
#13 | Posted: 30 Apr 2014 15:59 
An update: I've checked the addon_whosonline.php script and it seems I was wrong meaning it will re-generate the addon_whosonline_data.php file if you delete that!.. Sorry for this. In 2 years I forgot how it works :) Not sure how it could work earlier.

Now I have updated the package again, please get and re-install the fresh version of it. Let us know the results...

Author JohnSims
Partaker
#14 | Posted: 30 Apr 2014 16:18 
Thanks. Here is the entire script of the 'addon_whosonline.php' file:
<?php
/* Plugin options */

$woDir=$pathToFiles.'shared_files'; //general path to your directory, for storing temporary plugin file and data. On Linux/FreeBSD/Unix systems, it must have 0777 privileges. Many miniBB plugins will use this directory, so if you already have one, it is better to keep one directory for all shared files. No slash at the end!

$enableAnonymous=1; //enable anonymous visits (by IP) - set to 0 (no) or 1 (yes)

$expireTime=300; // in seconds - amount of activity time, after that time user activity is broken. 5 min = 300 sec.

$l_whosOnline='Online now: '; //language def.
$l_guestsOnline='Guests'; //language def.
$l_loggedOnline='Members'; //language def.
$l_onlineRecord='Most users ever online:'; //language def.

/* End of options - don't edit below */

if (!defined('INCLUDED776')) die ('Fatal error.');
###
I have also set the shared files folder to 777.

I will try the update. Thanks Paul!

Author Jaime
Partaker
#15 | Posted: 30 Apr 2014 16:38 
Paul:
Sorry for this. In 2 years I forgot how it works :)
No problem Paul! ... But ... Welcome to the young seniors =8-)

Page  Page 1 of 2:  1  2  Next » 
Bugs miniBB Support Forums / Bugs /
 Who's Online add-on's bug: giving "unexpected T_CONSTANT_ENCAPSED_STRING..."
 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.


  ⇑