php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56967 PDO incorrectly recognizes a php stream object as a String(0)"" in get_col func
Submitted: 2006-04-20 15:16 UTC Modified: 2006-04-21 00:17 UTC
From: kraman at gmail dot com Assigned:
Status: Not a bug Package: PDO (PECL)
PHP Version: 5.1.0 OS: 32bit Linux
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kraman at gmail dot com
New email:
PHP Version: OS:

 

 [2006-04-20 15:16 UTC] kraman at gmail dot com
Description:
------------
PHP 5.1.2 & bundeled PDO

I am trying to return a php_stream object when the user binds a resultset column using PDO::PARAM_LOB. To do so I follow the guidelines stated in the php_pdo_driver.h file:

/* get_col: when len is 0 ptr should point to a php_stream *,
 * otherwise it should behave like a string. Indicate a NULL field
 * value by setting the ptr to NULL */

I set the length as 0 and return the php_stream*.
However PDO/PHP recognizes this as String(0)"" instead of a php stream.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-21 00:17 UTC] wez@php.net
In order to return a stream, the driver must have communicated that the column type is a LOB type during the describe phase.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 17:01:28 2025 UTC