I searched the forum and could not find other instances where users are getting both messages at the same time.

Parse error: syntax error, unexpected '<' in /home4/xxx/public_html/xxx/modules/computed_field/computed_field.module(161) : eval()'d code on line 1

Parse error: syntax error, unexpected '<' in /home4/xxx/public_html/xxx/modules/computed_field/computed_field.module(299) : eval()'d code on line 1

The PHP I am using for the computed field is as follows:
$node_field[0]['value'] = ($node->field_weightlbs[0]['value']) * 16 + ($node->field_weightoz[0]['value']);

My goal is to have the admin enter the Weight LBS field and the Weight Oz field to get a Total Ounces Result. A simple formula of weight lbs * 16 + weight oz = Total Ounces.

I am using Drupal 6.20

Any insight as to why I getting these two error messages together and how to fix it would be outstanding. Thank you in advance.

Comments

TechnoTim2010’s picture

I am having the same issue.

This error only occurred when I migrated my site to the production server on a shared host.

The computed code is
$node_field[0]['value'] = $node->field_last_pat_test_date[0]['value'] + (365 * 24 * 60 * 60);

On my Dev Ubuntu box I had no issues at all. On the Production server I get the parse error all the time, not on every page but enough to remove the node type using computed field and also disable the module.

I have emailed the originator of this issue and we both get the same error on different sites with different hosts but the same php version running on each 5.2.17 and different code in their computed fields this clearly points to one of two things:

Either the code for Computed field is written to be wholly compliant with PHP 5.3 and above (I run 5.3.3 on my dev box) but 5.2.17 on the production host (both chris above and I have the same php versions on the production hosts and no way to change that) or running the computed field exposes some flaw in 5.2.17 or vice versa, which was not apparent before the sites were migrated and computed field used.

Regards

Tim

dqd’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Due to the Drupal core life cycle policy and security support advisery, Drupal 6 is no longer supported. So issues for Drupal 6 cannot be longer maintained. The project maintainer has asked for closing all D6 issues to clean up the issue queue. Feel free to reopen the issue if required or set it to "needs to be ported" and latest D8 dev version, if the issue discusses a still missing feature which can be implemented in the D8 version.