I'v got this message after upgrading to new version of devel:
Parse error: syntax error, unexpected ')', expecting '(' in /******/www/sites/all/modules/devel/devel.module on line 391

Same problem described here http://drupal.org/node/755760


moshe weitzman’s picture

Status:Active» Postponed (maintainer needs more info)

That line looks fine to me. the whole function:

function dfbt($label) {
  dfb($label, FirePHP::TRACE);
kuzyakiev’s picture

Version:6.x-1.9» 6.x-1.21

same error, i think this can be related with php 5.3, beacouse i have this error only on hostings with php 5.3

abaloo’s picture

Does anyone has an answer on this please? I have just experienced the same.

asimmonds’s picture

I've not been able to reproduce this with PHP 5.2 or 5.3 (did not try PHP 4), and various versions of devel.

We need to know some more details of the environment this error is occurring under, ie PHP, drupal and devel versions, as well as whether FirePHP is installed or not, and if so which version.

abaloo’s picture

Thanks for getting onto this.

I have switched my server to php5 and all is working fine. Must be an issue with php4 as the previous writer mentioned.

Diman_’s picture

same issue here. Line 398 in current release of devel.module file. The same function though

seems that PHP4 is the cause.

Is this the case? Devel no longer can be used on PHP4 servers ?

matslats’s picture

Version:6.x-1.21» 6.x-1.22

Ditto. It's php4.
There are other related errors as well.
What's the last version which worked with php4?

matthaas’s picture

I ran into this problem also and I noticed 2 things. First, there are FirePHP references like this:


This syntax isn't supported by PHP4. I looked at the FirePHP docs (at first, I thought it may be a case where FirePHP wasn't really optional) and they said to access variables like this under PHP4:


After that was fixed, I got this error:

PHP Parse error: syntax error, unexpected T_ARRAY, expecting ')' in C:\drupal-6.19\modules\devel\devel.module on line 404, referer: http://localhost/admin/build/modules which is this line:

function devel_watchdog(array $log_entry) {

I ended up looking at the definintion for hook_watchdog() and the above syntax is listed as being for Drupal 7. To make it match Drupal 6, I changed that line to:

function devel_watchdog($log_entry) {

This allowed me to enable the module. I haven't tried to use it yet so I don't know if this will cause other issues but it is at least a start.

salvis’s picture

Version:6.x-1.22» 6.x-1.21
Status:Postponed (maintainer needs more info)» Active

Yes, looks like Devel is gravitating towards PHP5.

@moshe: Do you want to keep supporting PHP4 with 6.x-1.x? Is it even possible to bring all the current features down to PHP4 level? Or should we add a requirement of PHP5?

moshe weitzman’s picture

I'd prefer to fix the problems on PHP4 and D6. If thats not plausible, then I'm OK with php5 requirement.

salvis’s picture

Title:Parse error: syntax error, unexpected ')'» Parse error: syntax error, unexpected ')' — PHP4 compatibility
Version:6.x-1.21» 6.x-1.x-dev

Ok, let's all update to the -dev version first. 'array' as mentioned in #8 was fixed by moshe in #889628: fatal error, line 404 eight weeks ago.

The FirePHP:: constants came in 9 months ago with #687192: Improve FirePHP integration: watchdog and backtrace. That thread is somehow stuck.

So, we need a patch to replace all instances of FirePHP:: with FirePHP_ — will this still work with PHP5? Can you provide the link to the reference, matthaas?

Then we need PHP4 and PHP5 testers to make sure that FirePHP (still) works on both versions...

DamienMcKenna’s picture

Issue summary:View changes
Status:Active» Closed (won't fix)

PHP4 support has been dropped from D6: https://www.drupal.org/requirements