|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-08-18 10:06 UTC] dk at trick dot ca
Description:
------------
PHP Segfaults when I query MS SQL Server 2005 via an ODBC DSN with PDO.
The query returns fine using tsql, and there is nothing wrong in the freetds log.
Reproduce code:
---------------
(names/credentials changed)
testpdo.php:
<?php
$d = new PDO('odbc:MYDSN','MYDUSERID', 'MYPASSWORD);
foreach ($d->query('SELECT * from MYTABLE') as $row) {
print_r($row);
}
odbc.ini:
[MYDSN]
Driver = /usr/lib/libtdsodbc.so.0
Description = MYDSN
Trace = Yes
Servername = MYSERVER
Database = MYDATABASE
freetds.conf:
[MYSERVER]
host = MYHOST
port = 1433
tds version = 8.0
Expected result:
----------------
print results or some sort of error.
Actual result:
--------------
# php testpdo.php
Segmentation fault
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 08:00:02 2025 UTC |
typo, first line of testpdo.pgp does have a missing quote: $d = new PDO('odbc:MYDSN','MYDUSERID', 'MYPASSWORD');