comks Posted June 24, 2006 Posted June 24, 2006 I was wondering if anyone else gets this error in Eclipse using PHPEclipse. I am getting a parser error from sessions.php on line 33 which is this: var $cookie_path = substr(DIR_WS_ADMIN, 0, -1); and the error message is this: Parser error "';' expected after field declaration." TIA!
straka Posted October 2, 2008 Posted October 2, 2008 i know this is a very old post, but i got the same error, and i have no idea why :rolleyes: i ask google about the error and this was the only result i received var $use_cookies = true; var $cookie_lifetime = 0; var $cookie_path = substr(DIR_WS_ADMIN, 0, -1); var $cookie_domain = '';
Guest Posted September 19, 2009 Posted September 19, 2009 I just installed EasyEclipse for PHP and I'm gettng the same error. Does anyone know how to fix it? Thanks, Doug
♥kymation Posted September 19, 2009 Posted September 19, 2009 Variable declarations in a class are required to be defined as constants if they are defined. This line attempts to calculate the value for $cookie_path, so it's technically wrong. However, I've never seen a server return an error for this. Check it on your site before you make changes. Regards Jim See my profile for a list of my addons and ways to get support.
MrPhil Posted September 19, 2009 Posted September 19, 2009 Variable declarations in a class are required to be defined as constants if they are defined. What you may need to do is to separate the variable declaration and its initialization. var $cookie_path = ''; In the class initializer: $cookie_path = substr(DIR_WS_ADMIN, 0, -1);
Recommended Posts
Archived
This topic is now archived and is closed to further replies.