When i try to configure options in the administor menu i get the following errors in places;

Fatal error: Only variables can be passed by reference in
/mnt/storage/users/b/3/o/b3online/home/modules/user.module on line 1293

and

Fatal error: Only variables can be passed by reference in
/mnt/storage/users/b/3/o/b3online/home/modules/system.module on line 649

are just two examples. I need a fix asap.
Ben McRedmond

Comments

asimmonds’s picture

Downgrade to PHP 5.0.4 if you can.

The upcoming Drupal 4.7 *may* work nicer with PHP 5.0.5

drewish’s picture

The core modules in 4.7 are fine on 5.0.5 at this point. Some contrib modules still may need updates though.

tesla.nicoli’s picture

What version of Drupal are you using?

I cn not find anything in the lines you gave that would cause the problem in 4.6.3.

djnz’s picture

There certainly is a problem with these lines in 4.6.3 - see http://drupal.org/node/35174#comment-63490.

--------------------- WEBg8 ---------------------

tesla.nicoli’s picture

Now I see the problem. Files.inc contains this:


function file_check_directory(&$directory, $mode = 0, $form_item = NULL) 

and so using it with the present code will not work in php5. Remove the ampersand in the function. Another way would be to put the info into a variable.

$f_d_p = variable_get('file_directory_path');
file_check_directory($f_d_p, 'files'), FILE_CREATE_DIRECTORY, 'file_directory_path');
xkater’s picture

many thanks - removing the "&" in Files.inc worked a charm!

WinXP2 - IIS 5.1
DRUPAL 4.6
PHP 5.5

MrMattles’s picture

Fatal error: Cannot use string offset as an array in /common/www/sites/ozmotorsport.com.au/_apps/drupal/themes/engines/phptemplate.engine on line 121

Any suggestions??

tesla.nicoli’s picture

I could not find a phptemplate.engine file in 4.6.3. what version are you running?

Then try a force the variable datatype to array by doing (array)$variable if can.

benofsky@www.benofskypark.com_index2’s picture

So do i just remove that line or add the other line

tesla.nicoli’s picture

Just a warning. The last version of PHP, 4.4.1 may cause some file and image problems because of a bug fix. This fixes a class methods problem but might make some functions not produce what they started out to do if you are counting on PHP to know the data type on its own.

An additional bug - $arr[] can be passed only to function that receives
argument by reference. This is fixed in CVS HEAD, PHP_5_1, PHP_5_0 and
PHP_4_4.