|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21114 Getting BLOB (image) Field with Sybase db
Submitted: 2002-12-20 08:39 UTC Modified: 2002-12-20 13:39 UTC
From: martin dot schlaak at web dot de Assigned:
Status: Closed Package: Sybase (dblib) related
PHP Version: 4.2.3 OS: linux 2.4.19
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
34 + 20 = ?
Subscribe to this entry?

 [2002-12-20 08:39 UTC] martin dot schlaak at web dot de
When selecting an image field from a table sybase_query
causes a segmentation fault in apache server.
The error occures when converting datatype image to char in
file php_sybase_db.c function php_sybase_get_column_content.
The problem is that the buffer is to small for the hex-string.
The buffer had to be the double size because a char is translated in 2 bytes.
If you increase the buffersize to 2*res_length its ok.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-20 10:11 UTC]
Please try using this CVS snapshot:
For Windows:

 [2002-12-20 13:25 UTC] martin dot schlaak at web dot de
SQL-Server 2000 submits type SYBIMAGE as datatype.
In file php_sybase_db.c function php_sybase_get_column_content only the types SYBBINARY and SYBVARBINARY are updated with double buffer size, not the SYBIMAGE which is submitted from SQL2000.
 [2002-12-20 13:39 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Sep 21 17:01:25 2023 UTC