Changing the ini setting is not going to be possible in most cases...
The real problem is the code is trying to call a function using a reference, which is not proper. Instead the function being called should accept the parameter by reference. Call time pass by reference is a deprecated feature and code should not be written to depend on it. It’s a fairly trivial change in most cases, unless the function being called is specifically required to handle references and copies. In other words, just change a call like:
myFunction($justAVar1, & $aVarPassedByReferenceAtCallTime);
to:
myFunction($justAVar1, $justAVar2);
and then change the function definition to treat the passed variable by reference by explicitly putting the & symbol before the parameter to be treated that way...i.e. change:
function myFunction($var1, $var2) { ... }
to:
function myFunction($var1, & $var2) { ... }
Hope that helps...