|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6601 blobs retrieved from database are limited to 32768 nibbles
Submitted: 2000-09-07 09:23 UTC Modified: 2000-10-09 10:46 UTC
From: koos at kzdoos dot xs4all dot nl Assigned:
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4.0.2 OS: Linux 2.2.17, redhat 6.2, sybase
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: koos at kzdoos dot xs4all dot nl
New email:
PHP Version: OS:


 [2000-09-07 09:23 UTC] koos at kzdoos dot xs4all dot nl
I store blobs in sybase IMAGE fields and when I retrieve them I only get the first 32768 nibbles and nothing more.

I store them using:

     INSERT INTO blob(blobtype_id,title,body)
     VALUES ($mimetypeid,'$blobtitle',0x".$blob.")");

and retrieve them using

    SELECT blobtype.mimetype,blob.body
    FROM blob,blobtype
    WHERE blob.blob_id=$blobobjectid
    AND blob.blobtype_id=blobtype.blobtype_id",$conid);
if ($qid){
    header("Content-Type: $blobtype_mimetype");
    echo pack("H".$bloblen,$blob_body);

using debug statements I found that $bloblen is never more then 32768, and the database contains bigger datalength's.

32768 is a round number so I guess I ran into some buffer size. What to do and how to get the bigger blobs.

PHP 4.0.2, apache 3.0.12
./configure --with-mysql --with-sybase-ct=/opt/sybase --with-apache=../apache_1.3.12 --enable-track-vars


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-27 23:58 UTC]
Closed thanks to Magnus Jonsson:

This is a Sybase configuration issue and not a bug. If you haven't specified
the Sybase Configuration the default is set to 32k. If you want to use
larger text or 
image fields change you Sybase Configuration or Use "SET TEXTSIZE (your
limit in bytes)" 
query to set this param before doing a query.

 [2000-10-09 10:46 UTC] koos at kzdoos dot xs4all dot nl
Thanks, this helped!
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 07:01:30 2024 UTC