|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-09-28 08:53 UTC] ab@php.net
-Status: Open
+Status: Feedback
[2017-09-28 08:53 UTC] ab@php.net
[2017-11-05 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 17 13:00:01 2025 UTC |
Description: ------------ Behavior exists in 5.5, 5.6, and 7.1. When querying a database via PDO ODBC, some fields are returning unexpected results which appear to be uninitialized memory, bits of the source PHP file that ran the script, other PHP files that were included, etc. I've run this same query via Golang and other GUIs and the correct data is returned. Example output: Array ( [0] => Array ( [body] => Lorem ipsum�/** * Finds the path to the file where the class is defined. * * @param string $class The name of the class * * @return string|false The path if found, false otherwise Since it's working as expected when querying via other languages/tools, I'm thinking the issue is within PDO and not the driver. Any direction on this issue would be much appreciated. Test script: --------------- $connection = new PDO("odbc:Driver=driver;Server=hostname;Database=dbname;Uid=uid;Pwd=pwd;"); $result = $connection ->query("SELECT body FROM posts WHERE id = 123") ->fetchAll(PDO::FETCH_ASSOC); print_r($result);