Parse error: syntax error, unexpected '{' in /home/site/public_html/drupal/modules/troll/troll.module on line 97

This shows after I install the module. Is there something wrong with the 6.1 version?

Comments

deekayen’s picture

Status: Active » Fixed

Your version of PHP is probably too old for the new features. Adding the new requirement to .info in my next commit.

TSNetwork’s picture

Actually I'm with the newest 5.2.9 version...

deekayen’s picture

Assigned: Unassigned »
Status: Fixed » Active

Alright then, that's in Joshua's new code.

Anonymous’s picture

I'm looking at the CVS version, but what happens if you remove lines 97, 112, 113, 114 and 115?
That would be the lines:

try {

... and ...

}
catch (Exception $e) {
watchdog('troll', 'PHP-IDS appears to be configured incorrectly.');
}

TSNetwork’s picture

Thank you, it works now. What was in that code, nothing too important I hope?

So now when someone is blocked he gets redirected to blocked.html, right?

Anonymous’s picture

Status: Active » Fixed

That section of code was error handling code that was introduced in PHP5. If I had to guess what is going on, I'd say that you have PHP 4 and 5 installed and that your webserver has been configured to run with PHP4. At least that would be my guess.

TSNetwork’s picture

I don't think that's it but I moved the website this week and anything could have happened to cause it...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.