"Call-time pass-by-reference" WARNING

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eshban
Forum Contributor
Posts: 184
Joined: Mon Sep 05, 2005 1:38 am

"Call-time pass-by-reference" WARNING

Post by eshban »

Hello,

I am just deployinh one SCRIPt, but i got this error.


"Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of each(). 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. However, future versions may not support this any longer"

I edit the php.ini file and set
'allow_call_time_pass_reference = On' instead of OFF
i do this change at 2 places in php.ini file, because this line is written at two places.

but this i got this error when i run the script.

Any idea that how to recover this????

regards,
Eshban
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Two things:

One, the error means you are running PHP5 and are trying to pass an object by reference. PHP5 does this automatically, so you can remove the references and just pass the object directly without the reference.

Two, I wouldn't change your php.ini. But if you do, remember to restart Apache to be on the safe side that all of your changes take effect.
Post Reply