#21114 [Opn->Csd]: Getting BLOB (image) Field with Sybase db
| From: | sesser@php.net | Date: | Fri, 20 Dec 2002 19:39:55 +0000 |
| Subject: | #21114 [Opn->Csd]: Getting BLOB (image) Field with Sybase db | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-28122@lists.php.net to get a copy of this message | ||
ID: 21114
Updated by: sesser@php.net
Reported By: martin.schlaak@web.de
-Status: Open
+Status: Closed
Bug Type: Sybase (dblib) related
Operating System: linux 2.4.19
PHP Version: 4.2.3
New Comment:
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 http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-12-20 13:25:00] martin.schlaak@web.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 10:11:49] sesser@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
------------------------------------------------------------------------
[2002-12-20 08:39:45] martin.schlaak@web.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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21114&edit=1