From: jrichardson at whisolutions dot com Operating system: Linux PHP version: 5.2.6 PHP Bug Type: MSSQL related Bug description: Passing XML as a parameter to a stored procedure, causes syntax error.
Description: ------------ When passing XML as a parameter to a stored procedure; the mssql_query call now interrupts the "/" as a special character and produces a syntax error. If the slashes are removed from the XML the SP executes, but the XML parser inside the procedure will not be able to handle it. The same query will execute and return the proper results when executed from PHP5 or from mssql server directly. Reproduce code: --------------- $sSQL = "exec any_store_procedure NULL, NULL, '<status><id>5</id><id>6</id><id>8</id></status>', NULL, '01/01/2008', '04/29/2008', 25, 1"; $rc = mssql_query($sSQL,$Link_ID); $returnedrows = mssql_num_rows($rc); Expected result: ---------------- Depends on the Stored Procedure. But this will causes a syntax error. When running the same query in PHP4 or directly in mssql, it returns a result. Actual result: -------------- Warning: mssql_query() [function.mssql-query]: message: Line 3: Incorrect syntax near ','. (severity 15) in -- Edit bug report at http://bugs.php.net/?id=44895&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44895&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44895&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44895&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44895&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44895&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44895&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44895&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44895&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44895&r=support Expected behavior: http://bugs.php.net/fix.php?id=44895&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44895&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44895&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44895&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44895&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44895&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44895&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44895&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44895&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44895&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44895&r=mysqlcfg