Warning in web site!


Suddenly from yesterday (08/06/10) morning, a warnings are displaying some pages of the web site. It’s a Joomla based site - “Warning: Call-time pass-by-reference has been deprecated in /home/abc/abc.com/…”.
I am searching for more warnings, I’ll let you know.
Nothing changed in the web site. So, is anything change/update in PHP version/PHO.INI file or anything else behind this warning at hosting side?



Most likely php has been updated.


Hi patric,
I am using Joomla 1.0.4. & php version is 5.2.13. So, thats the reason?
In the link:
"…function foo(&$var)…"
It has been confirmed that: “when you use & in foo(&$a);.” that warnings will be displayed.
So, If I remove “&” from functions, then it solved?
Thankxxx in advance.


well, removing “&” does not really solve the problem. It means you are NOT passing the variable as a reference any more.

I hope you understand what it means by passing as a reference.


I’ve serched & found that in php.INI file, it needs to check something like:

“allow_call_time_pass_reference” to “true” Or

  1. turn allow_call_time_pass_reference On
  2. remove the ‘&’ from the lines above.

What do you think? If I needs to access php/INI file, how can O do that???


Maybe I didn’t understand your comments correctly.

I think this line should already answered your questions.
Note: There is no reference sign on a function call - only on function definitions.

If you meant to remove the sign on a function call, it is good to go. If you meant to remove it from the above lines which is function definition, it will definitely cause problems.

FYI, if you ever need to compile your own php.ini file, you can follow the instruction on this article.

I’ve already tried the above example with the default php.ini file provided by DH and it is working perfectly. I will suggest you to revise all your scripts and remove sign on function call.