From: blockcipher at yahoo dot com
Operating system: Windows 2000
PHP version: 5.0.4
PHP Bug Type: Reproducible crash
Bug description: mysqli_bind_param/simple_xml interaction problem
Description:
------------
It appears that I found an interesting interaction between the simple_xml
library and the mysqli_bind_param function. The values contained within
an XML tag are returned as simple_xml object, not strings (which is what I
inferred from the Zend tutorial.) This had an adverse side-effect when
combined with the mysqli_bind_param function. Please note that this may
affect other functions/libraries as well.
The steps are as follows:
1. Copy the value of an XML element into a variable.
2. Use the element in a prepared mysqli statement, binding it to the
statement as a string.
3. Run the query.
4. Repeat steps 2 and 3, possibly with a different query.
After the bind or perhaps after I was done with the query, the actual data
was changed from a simple_xml object to a very odd looking string. This
would crash the apache web server approximately 80-90% of the time when
accessed.
Original variable data:
["username"]=>
object(SimpleXMLElement)#3 (1) {
[0]=>
string(4) "test"
}
Modified variable data:
["username"]=>
string(64) "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3
"
Reproduce code:
---------------
No code provided since it is being developed for the company I work for.
--
Edit bug report at http://bugs.php.net/?id=33233&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33233&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=33233&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=33233&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33233&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33233&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33233&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33233&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33233&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33233&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33233&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=33233&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=33233&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33233&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33233&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33233&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33233&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33233&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33233&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33233&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33233&r=mysqlcfg