warning: Parameter 3 to block_user() expected to be a reference, value given in C:\wamp\www\folder name\includes\module.inc on line 450.

ANY SOLUTION

HAVING PROBLEM IN INSTALLING THE WEBSITE.

VERY URGENT

Comments

webghost’s picture

This is a drupal error u can supress this error by replace
call_user_func_array($function, $args);
by
@call_user_func_array($function, $args);
I think they will fix this problem in drupal 7

bnysten’s picture

I did the modification. The errors do not show up anymore... but I get a blank page... I don't have access to my account details. I just have the two buttons "Save" & "Delete"

Blake Peshek’s picture

Did you end up getting this issue resolved? I'm also getting the blank page. I just have the "Save & Delete" buttons. Your help/info would be much appreciated.

Thanks, Blake

RonnieD’s picture

im having same problem but when i changed : call_user_func_array($function, $args);
to:
@call_user_func_array($function, $args);
on line 553 it brought up the same errors and didnt work.
Any more suggestions? Please.

RonnieD’s picture

any suggestions at all lads?

nevets’s picture

Which version of PHP are you using?

RonnieD’s picture

5.3.0 i think

nevets’s picture

Drupal 6 does not support PHP 5.3. There are a number of discussions about it, some include patches.

t4him’s picture

use your wamp control panel and download php version 5.2.9. All of your problems will go away.

RonnieD’s picture

Thanks lads its fixed. I downloaded Xampp 1.7.1 becasue i had 1.7.2 downloaded. However when goin to localhost/drupal i found a SQL error..
root@localhost Password Yes
my password wasnt set as Yes in my settings.php so i went into PhpMyadmin and went to the drupal database-privilages and went down to the change password section where i changed it to the password i set the settings.php to. Hope this helps people.
And GoodNight ha :)

RonnieD’s picture

Actually no it wont let me into the PhpMyadmin now..
SQL error..cannot connect: invalid settings.

m-t’s picture

I have exactly the same problem. During the installation of Drupal 6.13 I got the same error:

"warning: Parameter 3 to block_user() expected to be a reference, value given in C:\xampplite\htdocs\drupal\includes\module.inc on line 450."

This is the WAMP configuration I used:
xampplite-win32-1.7.2

If this bug is due to a wrong PHP version, does someone know how to update xampp?

Thanks in advance
mt

RonnieD’s picture

Well what i did was download xampp 1.7.1. From what i can gather it works the same as 1.7.2. So id recommend downloading 1.7.1 and working from there.

m-t’s picture

I tried your suggestion and it worked. Thanks for that! I hope that this kind of versioning problem will disappear in the upcoming releases.

Have a nice day

ask’s picture

It tells clearly that there should be the reference, not value.

I tried changing into this:
return call_user_func_array($function, &$args);

You can see extra ampersand. It seems to work as expected.

vasike’s picture

this works for me too

kambrian’s picture

that's great! it works for me as well.
It also applies to a similar problem in theme.inc, by modifying the same function call.
And a bonus is that the status report page shows up again after fixing that theme.inc problem.

michael.lee.baker@gmail.com’s picture

wow - one little '&' fixed everything

johanbackman’s picture

Had the same problem as described above, no access to user account.
This little "&" fixed the problem.

Many thanks!
Johan

miphol’s picture

Works perfectly! I'm so glad I checked this thread before downgrading php to 5.2.

purna_dey’s picture

Problem was:

Parameter 2 to boost_user() expected to be a reference, value given module.inc:450 [warning]
Parameter 2 to content_profile_user() expected to be a reference, value given module.inc:450 [warning]
Parameter 3 to block_user() expected to be a reference, value given module.inc:450 [warning]
Parameter 2 to blog_user() expected to be a reference, value given module.inc:450 [warning]
Parameter 3 to comment_user() expected to be a reference, value given module.inc:450 [warning]
Parameter 2 to contact_user() expected to be a reference, value given module.inc:450

When i m change the line

return call_user_func_array($function, $args);

to

return call_user_func_array($function, &$args);

in module.inc.
It's amazing work.

Thanks a lot!

nevets’s picture

Changing core is a bad practice, you should really fix the calling function

b3liev3’s picture

Read this #705512: drupal_alter('form'... called from content_add_more_js needs to pass $form_state as a reference

and try to apply the patch by chaos

ursika’s picture

I am having similar problem, but in menu.inc line 415.

I get this problem on many different admin settings pages, usually very random, in some cases once I refresh the page the error is gone, but in other cases I get WSOD. Here are some pages that returned this error:

admin/settings/site-maintenance
admin/user/invite
admin/settings/front
admin/og/og_user_roles

In the last 2 cases I get a WSOD, but in the first two I just get a warning message that disappears after refresh. The code that returns error comes from call_user_func_array in this part of the code in menu.inc:

$arguments = isset($menu['callbacks'][$path]['callback arguments']) ? $menu['callbacks'][$path]['callback arguments'] : array();

$arg = substr($_GET['q'], strlen($path) + 1);

if (strlen($arg)) {
$arguments = array_merge($arguments, explode('/', $arg));
}

return call_user_func_array($menu['callbacks'][$path]['callback'], $arguments);

I have tried adding & to $arguments, I also used typecasting (array) before the $arguments, since the behavior of array_merge() was modified in PHP 5. Unlike PHP 4, array_merge() only accepts parameters of type array. But none of that helped.

ANYONE HAD SIMILAR PROBLEM?

MuddassirAhmad’s picture

hi all. I m new to drupal. I installed drupal 5.23 and I am using xampp having apache and mysql. when installing drupal i am having following error after creating user.

: Function ereg() is deprecated in D:\facelogic\xampp\htdocs\drupal\modules\user\user.module on line 263.

I am using localhost now.
Kindly help me out.

nevets’s picture

If you are new to Drupal you should be using Drupal 6 or 7. That message occurs because you are running a newer version of PHP than Drupal 5 supports.

MuddassirAhmad’s picture

Thank you for your reply. Yes am new to drupal. I am try to make a shopping site. I have heard from my drupal friends that ubercart is a well designed and experienced module. So I decided to use this. But after wards i found that ubercart is only for drupal 5. So Now I am using drupal 6.23 and e- commerce module now. But thing is that I am having very much problem because its help is not available. Not even video tutorials are available. Also Its documentation page is missing. Can you just guide me where I can found its true material and documentation.

nevets’s picture

Ubertcart is available for D6.

MuddassirAhmad’s picture

Thank you Nevets. I found that.

howdytom’s picture

Thanks. Switching to PHP 5.2.x solved this issue.