[dev] [cvs] commit: framework/Auth/Auth pam.php

Michael M Slusarz slusarz at mail.curecanti.org
Thu Dec 1 14:38:45 PST 2005


Quoting Chuck Hagenbuch <chuck at horde.org>:

> Quoting Michael M Slusarz <slusarz at mail.curecanti.org>:
>
>> Obviously, this is an issue with the pam module - which was written for
>> PHP 4, not PHP 5.  If someone knows C code well enough, it would be
>> great to add a second function to the module (looks like it is public
>> domain) that will return the error message and remove the need for
>> pass-by-reference.
>
> This has nothing to do with PHP5 - call-time pass by ref has been
> disabled by default since PHP 4.2 at least, and officially deprecated
> at least that long...

Quoting Chuck Hagenbuch <chuck at horde.org>:

> Quoting Michael M Slusarz <slusarz at mail.curecanti.org>:
>
>> Obviously, this is an issue with the pam module - which was written for
>> PHP 4, not PHP 5.  If someone knows C code well enough, it would be
>> great to add a second function to the module (looks like it is public
>> domain) that will return the error message and remove the need for
>> pass-by-reference.
>
> This has nothing to do with PHP5 - call-time pass by ref has been
> disabled by default since PHP 4.2 at least, and officially deprecated
> at least that long...

Except i have this off:
allow_call_time_pass_reference = Off

So it looks like passing by reference to a compiled zend extension that 
*requires* the parameter to be a reference is still allowed and not 
deprecated, especially given the error message received when 
pass-by-ref is not used:

Warning: Error variable must be passed by reference in 
/httpd/htsdocs/horde/framework/Auth/Auth/pam.php on line 82

I believe call-time pass-by-ref was only deprecated when calling a 
userland generated function.  Maybe this was an oversight by the PHP 
folks...  And I'm not making any argument that the pam module was coded 
cleanly :) but we need to work with the tools we have unfortunately.

michael

_______________________________________
Michael Slusarz [slusarz at curecanti.org]


More information about the dev mailing list