Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
During installation of Boost on a server running Drupal 6.14 with PHP 4, hit the white screen of death (WSOD).
Had to disable the module from database.
Tried uninstalling the module and again hit a WSOD.
After enabling error reporting, got this error during un-installation :
Parse error: parse error, unexpected '=', expecting ')' in /domains/images/logicboxes_bauer/sites/all/modules/boost/boost.module on line 721
Searching for the possible solutions, landed on this page
Some versions of PHP4 gag on some function declaration syntax. Here are examples of syntax that fails:
function media_mover_api_media_mover($op, $action = null, $configuration = null, &$file = array(), $running_config = null ) { ...
function media_mover_api_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { ...
This appears to be a bug in PHP4 parser that makes it not be able to handle either too many "=" clauses in a function declaration or handle "&$..." So in at least some cases, this is a de facto PHP4 incompatibility.
Solution: Upgrade to PHP5.
ps : if there is no possibility of running on PHP 4, we can add the php = 5.x in the .info file :)
Comment | File | Size | Author |
---|---|---|---|
#2 | boost-663014.patch | 1.18 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentednot being able to do pass by reference would be a very bad thing (&$). not being able to assign default values in the function call isn't impossible to fix (=). So if your up for the challenge I'll see what I can do to get boost working with your version of PHP. What 4.x version is it BTW?
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedComment #3
rsvelko CreditAttribution: rsvelko commentedthe idea of the patch is good.
what about these two at the end?
Comment #4
rsvelko CreditAttribution: rsvelko commentedI propose a fast commit cause this wont hurt many people if it is wrong... Let them reopen it if needed.
Just tell me about the last 2 vars in the func args.
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedcommitted