This is the full message:
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 /var/www/web22/web/sites/all/modules/advanced_forum/advanced_forum.module on line 39

Comments

Salman_Rahma’s picture

I got the same error at the top of every page of my site after I upgraded to the alpha3 version. The error actually is not not only in line 39 but in lines 39, 42, 160, 313, 316, 359, 362, 398, 401, 492, 524, 527, all in advanced_forum.module file.

But the first top line actually complains about the same error but in line 616 of node_import.module file

Salman_Rahma’s picture

As per a suggestion from someone in #drupal-support, I added this line to .htaccess: php_value allow_call_time_pass_reference 1 but nothing changed
I am using dreamhost hosting

Salman_Rahma’s picture

ok.. I think I got the cause of the problem.

Call-time pass-by-reference has been deprecated in PHP 5 and will not even be available in PHP6 . It is only available in PHP 4. My domain is using PHP 5 because several modules require it to run probably. I downgraded it to 4 and got complains from other modules.

So probably the best solution is to upgrade the deprecated code :-)

Thank you for all your efforts

Michelle’s picture

That line is "advanced_forum_preprocess_node($vars);" which looks perfectly fine to me. So it must be one of those errors that doesn't report the actual line it's on. I have no clue what it means. I did some Googling and didn't find anything useful. Since I'm not getting the error, it's hard to fix. I'll leave this open for a while in case anyone has an idea. I'm guessing maybe it's a server config issue since none of my sites have the error and I'm running advforum on 4 different sites. (All the same server, though)

Michelle

Salman_Rahma’s picture

This is copy of a support request I filed in DreamHost:
----------------------------------------------------------------------
I am running Drupal as my site's cms. I recently upgraded one of the modules. Immediately after that I got several error messages at the top of every page. The error basically says: Warning: Call-time pass-by-reference has been deprecated

After talking to people in #deamhost the problem is probably because of PHP5, unfortunately I can not go back to PHP4 as I use other modules that depend on the newer version.

I did add a line: .htaccess: php_value allow_call_time_pass_reference 1

but nothing changed

I filed a bug in for the module developer, and this is what she said:
That line is "advanced_forum_preprocess_node($vars);" which looks perfectly fine to me. So it must be one of those errors that doesn't report the actual line it's on. I have no clue what it means. I did some Googling and didn't find anything useful. Since I'm not getting the error, it's hard to fix. I'll leave this open for a while in case anyone has an idea. I'm guessing maybe it's a server config issue since none of my sites have the error and I'm running advforum on 4 different sites. (All the same server, though)

As far as I know, the developer is also hosting her sites here in Dreamhost as well.

Please advice.

ps. link to the support request: http://drupal.org/node/230513

Salman_Rahma’s picture

This is the reply I got from DreamHost support team:
------------------------------------------------------------------------
Hello Salman,

Yes, due to the fact that PHP is running as a CGI process, it doesn't
actually receive .htaccess directives, and needs to be enabled via
php.ini. To accomplish this, we actually allow you to run your own
PHP.ini so you can configure it as you like, and not affect others on the
server. Here's an article that explains how to go about that.

http://wiki.dreamhost.com/PHP.ini

Bear in mind, we can't do this for you as it entails custom
configuration, but if you need help, you can always turn to
http://discussion.dreamhost.com for help...our customers were the ones
who wrote the article in the first place!

Let me know if you have any other questions!

Thanks!
Jeff

Michelle’s picture

Can anyone confirm this is still happening on the latest dev version? A lot has changed since alpha 3. I need to fix an issue with the last post in a forum and then I'm going to do an alpha 4.

Michelle

shittii’s picture

Edit: I'm still testing some more. Will post info later...

ultimike’s picture

subscribe

Michelle’s picture

Status: Active » Fixed

I've released alpha 4 and still haven't heard anyone say this is still a problem. Since I never got this error, I have no way of testing. I Googled the error and nothing looked familiar so I really have no clue what this error is even about so maybe I've fixed it just via other code changes. Unless someone can confirm this is still a problem in alpha 4, I'm going to consider this fixed.

Michelle

Salman_Rahma’s picture

Sorry for the late reply. I just noticed the update. It seems that alpha4 has solved the problem.
I only see similar errors with node import module so I post a bug report there with a link to this page.

Thank you Michelle

Michelle’s picture

Title: Warning: Call-time pass-by-reference has been deprecated; during activating the modul » Warning: Call-time pass-by-reference has been deprecated; during activating the module

Great! Still no clue what caused it but at least it went away. One of those odd glitches, I guess. :)

Michelle

Salman_Rahma’s picture

I know that this issue is closed since the bug has been 'somehow' fixed, but I though you might be interested in knowing how it was solved in another module:
Node Import: http://drupal.org/node/233680

Michelle’s picture

Ooooooh! I bet it was that typo I fixed. I was doing a general code clean up and noticed I had accidentally copied the & into a couple of function calls so I took them back out again. Since I never got this error to begin with, I didn't notice any difference and didn't think anything of it at the time, and by the time the error was reported it was already fixed so I was looking at the fixed line and not seeing anything wrong with it. Looking at what changed over there reminded me. Well, mystery solved, then. LOL

Thanks,

Michelle

Anonymous’s picture

Status: Fixed » Closed (fixed)

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