php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8517 BLOB functions don't work with IB6
Submitted: 2001-01-02 12:20 UTC Modified: 2003-08-16 10:19 UTC
From: hp at oeri dot ch Assigned:
Status: Not a bug Package: InterBase related
PHP Version: 4.0.4 OS: Linux 2.2.17
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hp at oeri dot ch
New email:
PHP Version: OS:

 

 [2001-01-02 12:20 UTC] hp at oeri dot ch
In the following snippet, $bstr is set to some binary data, not a blob id string:
- bstr is not accepted by ibase_query
- on echoing bstr, the closing brace is NEVER printed
- strlen( bstr ) segfaults php...

--- SNIPPET START ---
<?
    $dbh = ibase_connect( "localhost:/path/to/db/db.gdb", "user", "pass" );
 
    $bid = ibase_blob_create( $dbh );
    ibase_blob_add( $bid, "alpha" );
    $bstr = ibase_blob_close( $bid );
 
    $sql = "INSERT INTO testtable values(1,$bstr)";
 
    ibase_query( $dbh, $sql );
    ibase_close( $dbh );
?> 
--- SNIPPET END ---

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-11 16:56 UTC] lobbin@php.net
Can you reproduce this error on 4.1.1?
 [2002-02-02 06:45 UTC] sander@php.net
No feedback was provided for this bug, so it is being suspended.
If you are able to provide the information that was requested,
please do so and change the status of the bug back to "Open".
 [2003-08-16 10:19 UTC] abies@php.net
Apart from the segfault on strlen, which is non-Interbase related, this is behaviour as expected. You can only use binding with blob ids, because the contents of the string have no meaning to the engine, only to the PHP layer. Furthermore, it's a binary string so it looks like garbage.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Jan 26 05:01:24 2020 UTC