Hi,
I'm running drupal 6.14 on the latest xampp (php 5.3, mysql 5.1.37) and I found a problem with realname (1.3).
To be sure I've done a clean installation where I installed only drupal and realname.
Realname is using a single text field in core profile module.
When I activate realname, I report this error:
warning: Parameter 1 to profile_load_profile() expected to be a reference, value given in C:\xampp\htdocs\prove\includes\module.inc on line 450
I'm completely newbie, but I think the problem is related to this one --> http://drupal.org/node/360605
In particular they speak about realname here --> http://drupal.org/node/360605#comment-1689842
The patch they talk about is already committed in core 6.14, but the realname problem seems not related to core (as stated in the post linked above) and so the patch doesn't fix it.
I reported this error thinking is a bug, but, as stated before, I'm newbie so delete this post with no problem ;)
Thx
Comment | File | Size | Author |
---|---|---|---|
#6 | realname_php53fix.patch | 765 bytes | Berdir |
Comments
Comment #1
Sera CreditAttribution: Sera commented*deleting wrong "solution"*
Thx diggemall (see #2) for clarification.
Comment #2
digemall CreditAttribution: digemall commentedChanging the line
to
in realname.module, you skip the warning simply because the function that you call with module_invoke ( = profile__load_profile) doesn't exist.
So you don't get the warning but you don't obtain an overriden realname too (i've tested it).
The only change that really works, is removing the "&" from the line
in core profile.module
I don't know how this could be fixed by realname module, probably it's not possible...
I really think it's a core problem but probably drupal 6 aims to be compatible with php4 so the & won't be removed...
Comment #3
VM CreditAttribution: VM commentedDrupal 6.x core is aimed at PHP 4.3.5 to PHP 5.2.x
PHP 5.3 didn't exist when Drupal 6.x was released. PHP 5.3 deprecated a function or two which causes issue with core and contrib where this functions are used. Best bet is to roll back to PHP 5.2.x unless you have the skillset to patch core and contrib modules and hopefully contribute the patches back to the community.
for more info on the PHP and drupal requirements and reccomendations see: http://drupal.org/requirements
Comment #4
digemall CreditAttribution: digemall commentedOk thx for the clarification VM ;)
Comment #5
oriol_e9gtagged
Comment #6
BerdirThis can be fixed. It is not correct to use module_invoke or module_invoke_all() for functions that have by reference arguments. (the by reference in profile_load_profile is needed for PHP 4 compatibility btw). Instead, the correct way is to call $load_func($account, $type). $load_func is already created and checked above, so this is a oneliner...
Comment #7
JohannE CreditAttribution: JohannE commentedI run Drupal 6.15 with UberDrupal 6.14. I am not sure how to tackle the original error.
"warning: Parameter 1 to profile_load_profile() expected to be a reference, value given in E:\www\mysite.com\includes\module.inc on line 462."
I am not a programmer/developer and I rely completely on this site.
Thank You
Comment #8
digemall CreditAttribution: digemall commentedProbably you are not in the right place (this thread is for realname module issues).
Are you running drupal PHP 5.3 ? There are many problem with that, discussed for example here http://drupal.org/node/360605
I suggest you to switch back to php 5.2 if you can, otherwise you must probably patch your drupal core modules (ask help to that link)
Comment #9
JohannE CreditAttribution: JohannE commentedI am running PHP Version 5.3.1.
I suck at this stuff but I am stupid enough/determined enough to keep at it.
It's a home-based server so I have control, when things work out.
Fortunately this is only important to me so no one's freaking out. I'll be asking questions in the wrong area again I suspect.
Thank You
Comment #10
digemall CreditAttribution: digemall commentedSorry, I was wrong stating that you must patch you drupal core...
Actually, I've re-read drupal requirements ( http://drupal.org/requirements ) and they state that drupal core support php 5.3.x from v.6.14 on, but not all
corecontrib modules do.I supposed that your problem was in the core, but can actually be in realname (if you have it enable) or in other contrib modules.
Sure, at the link I mentioned above, someone will help you to find a way to fix your problem.
I apologize for my inaccurate answer.
P.S.
if you have realname module enabled, try to disable it and check if the problem disappear... in that case write here with resoluteness ;)
Comment #11
BerdirErm, not sure what you are talking about ;)
There is a bug remaining, but except of that, all core modules support PHP 5.3. They are talking about contrib modules on that page.
Yes and the patch to fix this is in comment #6 above.
Comment #12
digemall CreditAttribution: digemall commentedSorry I wrote in a hurry... actually I meant, "but not all contrib modules do."
Comment #13
YK85 CreditAttribution: YK85 commentedsubscribing
Comment #14
marvil07 CreditAttribution: marvil07 commentedI should search before making patches :-p
After reading #360605: PHP 5.3 Compatibility I came to the same patch and conclusion Berdir propose here. And I can confirm it works fine :-)
For more reference about this, take a look to a gpk comment on that issue
I'm marking this as critical since this bug broke the main functionality of the module in PHP 5.3
Comment #15
abbasmousavi CreditAttribution: abbasmousavi commentedThe patch by Berdir works. please commit the patch to CVS.
thanks
Comment #16
daltonparsons CreditAttribution: daltonparsons commentedThe patch by Berdir works +1
Thank you, Berdir...saved us tonight.
Comment #17
Andrew Schulman CreditAttribution: Andrew Schulman commentedConfirmed that Berdir's patch fixes this error. Thanks!
Comment #18
NancyDruCommitted to 6.x-1.x-dev.
Comment #20
verta CreditAttribution: verta commentedI can confirm that installing the dev release corrects this error message when using PHP 5.3 and the Drupal 6.19 core profile module with Realnames. Thanks for the fix!
Comment #21
Slovak CreditAttribution: Slovak commentedHad the same issue. Installed the 6.x-1.x-dev release from 2010-Jul-11 and the errors went away.
Comment #22
Briscoe CreditAttribution: Briscoe commentedSame issue with PHP 5.3 and Drupal 6.20. The installation of the last 6.x-1.x-dev release fix it.
Comment #23
Stalski CreditAttribution: Stalski commentedSubscribing, patch fixes it
Comment #24
Andrew Schulman CreditAttribution: Andrew Schulman commentedSince this has been fixed in -dev for about 7 months, can we please have a new release?
Comment #25
penguintrax CreditAttribution: penguintrax commentedI'm new with this, so can you provide some clearer instructions on how to apply this patch code? My attempts have not been successful.
Thank you very much.
Barbara
Comment #26
verta CreditAttribution: verta commentedYou won't need to apply the patch to get the fix discussed in this thread, it's been rolled into the module you get when you get the dev release from the module page. Development releases are listed after the "recommended" releases.
But if you want to learn about applying patches, http://drupal.org/patch/apply is the official page.
+1 for a 1.4 release.
Comment #27
John Franklin CreditAttribution: John Franklin commentedI'd be happy with a 1.3.1 release that had only bugfixes like this one pulled into it.
Comment #28
scotwith1tin case anyone ends up here and wonders, 1.4 was released and includes this fix.
Comment #29
sbogner@insightcp.com CreditAttribution: sbogner@insightcp.com commentedHi all - I have PHP 5.3.3 and version 1.5 of Real Name, and still get this error:
Parameter 1 to profile_load_profile() expected to be a reference, value given in includes/module.inc on line 476
I see people report that it was fixed with release 1.4, but maybe something broke it in 1.5?
Comment #30
puddyglumIt could be a different module causing that error. I'm not getting that error though I'm running 5.3.3 and 1.5 of Real Name. Have you upgraded the Profile module?
Comment #31
sbogner@insightcp.com CreditAttribution: sbogner@insightcp.com commentedHi jmonkfish - Thanks for the reply. I'm on Drupal 6.26 - and Profile is part of core so that's the latest at this point, I believe.
Comment #32
NancyDruThe error message would indicate a core problem (includes/module.inc).
Comment #33
puddyglumSorry, I got Profile mixed up with Content Profile, which is what we use with Real Name (and may be why we're not getting that error).
Comment #34
sbogner@insightcp.com CreditAttribution: sbogner@insightcp.com commentedHi jmonkfish - Thanks for the info, but I don't have Content Profile installed... maybe that's the problem? I will get that installed and report back on how that impacts the error.
Comment #35
sbogner@insightcp.com CreditAttribution: sbogner@insightcp.com commentedI installed the Content Profile module and still get the same error as before:
Parameter 1 to profile_load_profile() expected to be a reference, value given in .../htdocs/includes/module.inc on line 476.
Comment #36
hass CreditAttribution: hass commented