From: Operating system: CentOS 5.4 PHP version: 5.2.14 Package: PDO related Bug Type: Bug Bug description:MSSQL Money Fields Causes Segfault on SELECT
Description: ------------ After upgrading from PHP 5.2.13 to 5.2.14 select queries on MSSQL tables with columns of type MONEY will produce a segfault. When the MONEY column is changed to something like DECIMAL(10, 2), the segfault is no longer present. The problem ceases when php is downgraded to 5.2.13, indicating the issue to be with the current version. A description of my environment is included below: ================================================== OS: CentOS 5.4 DB Connector: FreeTDS (Tested with both 0.64 and 0.82) HTTP Server: Apache 2.2.3 SQL: Microsoft SQL Server 2008 R2 Test script: --------------- create a table with a column of type money $dsn = 'dblib:dbname=mydatabase;host=mssql.example.com'; $user = 'REDACTED'; $password = 'REDACTED'; try { $dbh = new PDO($dsn, $user, $password); } catch (PDOException $e) { echo 'Connection failed: ' . $e->getMessage(); } foreach ($dbh->query('SELECT * FROM TableWithMoneyColumn') as $row) { echo $row['AnyColumn'] . "\n"; } Expected result: ---------------- A page with output from the database. Actual result: -------------- Blank screen with segfault present in apache's logs -- Edit bug report at http://bugs.php.net/bug.php?id=52600&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52600&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52600&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52600&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52600&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52600&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52600&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52600&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52600&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52600&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52600&r=support Expected behavior: http://bugs.php.net/fix.php?id=52600&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52600&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52600&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52600&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52600&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52600&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52600&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52600&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52600&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52600&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52600&r=mysqlcfg