From: [EMAIL PROTECTED]
Operating system: windows
PHP version: 4.3.0
PHP Bug Type: Scripting Engine problem
Bug description: problems with reference passing through layers of functions in
windows/IIS/sapi
I upgraded PHP to 4.3.0, from 4.2.3, running in IIS5 as a SAPI module. I
had hacked stored procedure support for MSSQL into the PEAR DB class with
a function like:
function spBindOutputParam($stmt, $name, &$outref, $type) {
return mssql_bind($stmt, $name, &$outref, $type, true, false);
}
... right? then, in my own DBAbstraction classes, I had something like:
function bindOutputParam($name, &$outref, $type) {
/// debugger
global $debug;
//$debug->println("DBStoredProcedure::bindOutputParam() called, outref =
".$outref."", 5);
return $this->db_connection->spBindOutputParam($this->db_stmt, $name,
&$outref, $type);
}
... and so on, up through the layers of abstraction in my application
framework, always passing the output parameter $outref by value. I
upgraded to PHP 4.3.0 and it BROKE. the functions all completely failed to
modify $outref. it works fine, I stress, in PHP 4.2.3. I desperately tried
a bunch of stuff like removing the '&' from ONLY the function signatures,
or ONLY the subsequent calls, or what have you. totally busted. has anyone
run into anything like this? I'm guessing it's a PHP 4.2.3->4.3.0 thing
but who knows? maybe also with MSSQL in PHP. let me know. thanks!
-fish
--
Edit bug report at http://bugs.php.net/?id=21791&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=21791&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=21791&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=21791&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=21791&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=21791&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=21791&r=support
Expected behavior: http://bugs.php.net/fix.php?id=21791&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=21791&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=21791&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=21791&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21791&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=21791&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=21791&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=21791&r=gnused