php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52600 MSSQL Money Fields Causes Segfault on SELECT
Submitted: 2010-08-13 18:03 UTC Modified: 2010-08-13 18:24 UTC
From: nicholas dot j dot miller at gmail dot com Assigned:
Status: Duplicate Package: PDO related
PHP Version: 5.2.14 OS: CentOS 5.4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
8 + 46 = ?
Subscribe to this entry?

 
 [2010-08-13 18:03 UTC] nicholas dot j dot miller at gmail dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-13 18:24 UTC] aharvey@php.net
-Status: Open +Status: Duplicate
 [2010-08-13 18:24 UTC] aharvey@php.net
Looks like a duplicate of bug #52546.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 00:01:32 2024 UTC