Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PHPEclipse Parser error


comks

Recommended Posts

Posted

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!

  • 2 years later...
Posted

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 = '';

  • 11 months later...
Posted

I just installed EasyEclipse for PHP and I'm gettng the same error. Does anyone know how to fix it?

 

Thanks,

 

Doug

Posted

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.

Posted
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);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...