PDA

View Full Version : Bug found in the last counter v3.50



bob
10-10-2004, 12:49 PM
Firstly , excellent job on the counter, I love it because i dont have SQL database and it is still powerful in a db file.
I was using it since a long time now on a php3 server without problems, but since I moved my website on a php4 server there is some symbol errors and I havent found yet how to fix.



PHP Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\Domains\kd-team.com\wwwroot\dfind\c0unter\counter.php on line 34


where the line 34 is:



<?php global $DB, $OPTION;
// --------------------------------------------
// | The EP-Dev Counter script
// |
// | Copyright (c) 2002-2004 EP-Dev.com :
// | This program is distributed as free
// | software under the GNU General Public
// | License as published by the Free Software
// | Foundation. You may freely redistribute
// | and/or modify this program.
// |
// --------------------------------------------

// ------------- //
// Database Type //
// ------------- //
// Use MySQL Database (1 = use mysql, 0 = use files)
$DB['type'] = 0;


// ----------------- //
// SITE CONFIG SETUP //
// ----------------- //
/* Absolute path to counter script (ex: "/mywebsite/counter/") with trailing slash.
NOTE: If you do not know what your absolute path is, please run run abs.php that
is included with this counter's zip file. */
$OPTION['Absolute_Path'] = "C:\Domains\kd-team.com\wwwroot\dfind\c0unter\";


// --------------- //
// COUNTER OPTIONS //
// --------------- //
// Online Time - Number of minutes a visitor is considered online:
$OPTION['OnlineTime'] = 15; <<<<<====== LINE 34


Then i suppose the line 34 is correct but It should be a bug coming from the line above



$OPTION['Absolute_Path'] = "C:\Domains\kd-team.com\wwwroot\dfind\c0unter\";


the \" is prolly what is buuging here so to fix I moved $OPTION['Absolute_Path']
to the end of my file , the error line 34 is fixed and all others so but I still got one
and im unable to fix it



PHP Parse error: parse error, unexpected $end in C:\Domains\kd-team.com\wwwroot\dfind\c0unter\counter.php on line 733


Plz help me I dont wnat to change the script.

Patrick
10-10-2004, 01:12 PM
You are right that it involves your absolute path.

I am guessing you moved from a Linux to a Windows server.

In PHP, \ have a special meaning of course, resulting in your errors. Thus you can either enter a double slash \\ or use a forward slash /

I prefer the forward slash, thus your absolute path should be:


$OPTION['Absolute_Path'] = "C:/Domains/kd-team.com/wwwroot/dfind/c0unter/";


This should take care of any errors you were receiving.

EDIT:
Oh, and be sure to put $OPTION['Absolute_Path'] back where it was.

bob
10-10-2004, 01:22 PM
big smack to you Patiek ;D
works like a charm as before hehehehehehe, took me some hours of modding finally just to change \ to / in the path lol.

Really 100000000x thanx dude for the quick answer hehe, dfind.kd-team.com is now opened again with your help hehe ;)

later man.

Patrick
10-11-2004, 09:23 PM
You said in version 3.5.

Is this a typo or do you have 3.5? If so, could you tell me where you got this version as I would be interested in knowing who has updated my own scripts ;)

bob
06-11-2005, 02:38 PM
sorry man for the long time without answer :/

yeah of course I made a mistake, its 3.45 ;)