PHP error after installation
cmcqueen1975 - June 24, 2008 - 11:47
| Project: | Spam |
| Version: | 5.x-3.0-alpha5 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Jeremy@kerneltrap.org |
| Status: | closed |
Jump to:
Description
I've just tried installing the new alpha5 version. I subsequently get the following message:
Parse error: syntax error, unexpected '=', expecting ')' in /home/mcq14816/public_html/drupal/sites/all/modules/spam/modules/spam_comment.inc on line 48
I'm running Drupal 5.2. PHP version 4.4.6.

#1
Please try with the latest development snapshot -- there have been several fixes committed there since the release of -alpha5.
#2
I'm using the latest development snapshot and having the same problem.
PHP 4.4.6 does not support default values for reference arguments, which is causing a parse error at spam_comment.inc:42 (arg2)
<?phpfunction comment_spamapi($op, $arg1 = NULL, &$arg2 = NULL, $arg3 = NULL)
?>
Is it possible to either drop the default value or the reference operator?
#3
Thanks for tracking down the problem. I'll give this more thought and be sure to fix it before the next alpha release.
#4
Thanks for your response. For reference, I asked my host to transfer me to a PHP 5 server, and now the module works fine!
#5
Having the same problem running PHP 4.4.4
#6
Fixed committed to the current development branch.
#7
Automatically closed -- issue fixed for two weeks with no activity.