|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73312 DBlib continues to return binary data instead of stringified "uniqueidentifier"
Submitted: 2016-10-13 10:39 UTC Modified: 2016-10-13 15:55 UTC
From: Andrey dot Inihov at yandex dot ru Assigned:
Status: Not a bug Package: PDO DBlib
PHP Version: 7.0.11 OS: Centos 7
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: Andrey dot Inihov at yandex dot ru
New email:
PHP Version: OS:


 [2016-10-13 10:39 UTC] Andrey dot Inihov at yandex dot ru
The test script (as well as any sql query intended to retrieve uniqueidentifier from database) keeps returning binary data instead of its' stringified value. 

PHP Version: 7.0.11 from webtatic
Apache: 2.4.6

Test script:
$dbh = new \PDO ("dblib:host=;dbname=a3ssmDEV", "web_interface", "X9QARIhY");
$stmt = $dbh->prepare("select UserID from a3.dat_dat_User where Login = 'example'");
while ($row = $stmt->fetch()) {


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-13 13:26 UTC]
-Status: Open +Status: Feedback
 [2016-10-13 13:26 UTC]
I think you need to add this line after creating the PDO instance:

The commit that introduced this feature includes a test that should illustrate how it works:
 [2016-10-13 15:32 UTC] Andrey dot Inihov at yandex dot ru
Yep, it worked. Sorry for bothering you. 

Bug may be closed now.
 [2016-10-13 15:55 UTC]
-Status: Feedback +Status: Not a bug
 [2016-10-13 15:55 UTC]
Thanks, closing!
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Aug 17 15:01:26 2019 UTC