I get the following errors when enabling the pageroute module. I don't have access to the INI file. Suggestions?

Drupal 6.6, PHP 5.2.6

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /usr/www/users/ccspucd/casta/sites/all/modules/pageroute/pageroute.module on line 133

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of module_invoke_all(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /usr/www/users/ccspucd/casta/sites/all/modules/pageroute/pageroute.module on line 135

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of call_user_func(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /usr/www/users/ccspucd/casta/sites/all/modules/pageroute/pageroute.module on line 258

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of call_user_func(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /usr/www/users/ccspucd/casta/sites/all/modules/pageroute/pageroute.module on line 433

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of call_user_func(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /usr/www/users/ccspucd/casta/sites/all/modules/pageroute/pageroute.module on line 433

Comments

fmitchell’s picture

Status: Active » Fixed

I was getting this too on a client site hosted by GoDaddy.

I put:

allow_call_time_pass_reference = On

in a php5.ini file in the root and the error went away.

GoDaddy by default uses PHP4, so I had the .htaccess hack to handle php5, thus why creating a php5.ini file worked and putting it in the regular php.ini didn't.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

rootwork’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Active

I got a bunch of these errors too, hosting on DreamHost and using PHP5. Adding the php5.ini file didn't have any effect.

In my opinion this is a critical bug that prevents the module from being usable. If this module is dependent on a particular type of server, configuration of PHP or access to root-level things that most shared-hosting folks won't have, I think it should be prominently disclaimed on the module page and installation instructions.

SocialNicheGuru’s picture

Hi, this is also happening to me.

I just did a clean install to D6.9. I get the same errors as above

In every other module that this appears in (and there are a few), &$form has been the culprit or anything that begins with '&$'.

grep -in '&$form' pageroute/*

In d6.9, I can't seem to run update.php until these errors are resolved.

lefnire’s picture

$&variable appears in a lot of call_user_func() calls, and are therefore necessary. In many modules, you can safely delete the ref signs for any variable not appearing in the argument list of the function declaration, but not so with this module. It appears you *must* do that php.ini bit mentioned above until fago/tauran come up with a sol'n

Tauran’s picture

Version: 6.x-1.0-beta1 » 6.x-1.x-dev
Status: Active » Fixed

I replaced the calls with $object->$static_method($variable) or call_user_func_array(array($class, $function), array(&$variable)) where it was necessary.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.