when i tryed to install the module i get the following error:
Fatal error: Only variables can be passed by reference in /opt/lampp/htdocs/drupal/modules/project/project.module on line 169

i already check the code, but i doesn't check nothing wrong.

thanks in advance.

Comments

pfaocle’s picture

Sounds like a PHP 5 error - can you confirm the version of PHP you are using?

flebel’s picture

i confirm. this didnt work with php5.

flebel@dune[/home/vrdri-01/ftp/project]> php -v
PHP 5.0.5 (cli) (built: Oct 18 2005 15:43:43)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.5, Copyright (c) 1998-2004 Zend Technologies

Fatal error: Only variables can be passed by reference in /usr/home/vrdri-01/ftp/html/modules/project.module on line 169

pfaocle’s picture

Title: module activation » Pass by reference error in PHP 5.0.5
Category: support » bug

Cheers.

benwei’s picture

From what I understand, this is a change that was made between PHP 5.0.4 and 5.0.5. There are similar bugs to this all throughout Drupal and associated modules if you are using PHP 5.0.5. Some of them have been fixed already in CVS, I'm not sure about this one.

For a quick fix to these types of issues, you can usually just store the result of whatever function is being called in a temporary variable and pass that instead. Or you could also downgrade to PHP 5.0.4

See
http://drupal.org/node/35363

Cheers,
Ben

drewish’s picture

I've heard the new 4.4 release has the same "fix" in it.

fago’s picture

Status: Active » Closed (duplicate)