RHEL now has PHP 5.3 packages. We are unable to install Drupal 6.20. During the install script, the following fatal error is logged by apache:

[Thu Mar 17 15:41:03 2011] [error] [client x.x.x.x] PHP Fatal error:  Cannot pass parameter 2 by reference in /var/www/thesite/install.php on line 1126, referer: https://xxx.xxxx.org/install.php?locale=&profile=thesite_profile&op=start&id=1

Relevant line in install.php is:

$hook_form_alter($form, array(), 'install_configure');

The workaround is to define the 2nd parameter as a variable, and pass that:

$fs = array();
$hook_form_alter($form, $fs, 'install_configure');
[root@web1 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 5.6 (Tikanga)

[root@web1 ~]# php -v
PHP 5.3.3 (cli) (built: Jan 20 2011 06:13:52) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

Comments

kristofferwiklund’s picture

Is this issue still valid? With newer supported version of RHEL this should not be any problem.

jacob.embree’s picture

Version: 6.20 » 6.x-dev
Priority: Critical » Minor
Issue summary: View changes

The documentation for hook_form_alter indicates $form_state will be passed by reference. This is not true in the custom invocation in install.php.

Just to allow custom profiles to use the documented parameters, it makes sense to replace array() with $form_state.

Either way, profiles do not need to modify $form_state in hook_form_alter(), so for now leave out the ampersand in custom profiles.

Marking as minor because only contributed profiles are affected and the work around is trivial.

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.