#27083 [Opn->Asn]: binding blobs to procedure params corrupts them
| From: | nlopess@php.net | Date: | Sat, 22 May 2004 09:42:18 +0000 |
| Subject: | #27083 [Opn->Asn]: binding blobs to procedure params corrupts them | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969360799@lists.php.net to get a copy of this message | ||
ID: 27083
Updated by: nlopess@php.net
Reported By: ceco at noxis dot net
-Status: Open
+Status: Assigned
Bug Type: Documentation problem
Operating System: windows 2000 server
PHP Version: 4.3.4
Assigned To: tony2001
New Comment:
Hi Antony!
Is this already solved in the new docs?
Previous Comments:
------------------------------------------------------------------------
[2004-02-04 05:37:24] ceco at noxis dot net
ok i'll leave it that way, but just a suggestion for the new version
isn't it strange to make method WriteTemporary to accept second param,
which explicitly tells the object, which type of instance it is?
can't it be done when binding it (OCIBindByName) to something to change
the type of object so it knows what it is bound to (blob,clob or
whatever),
or when created to tell it the type OCINewDescriptor with the last
param
------------------------------------------------------------------------
[2004-02-04 03:55:49] tony2001@php.net
In php 4.3.x method writeTemporary() doesn't accept second parameter,
which exists only in php5 branch.
This parameter should be used to tell method wich type of Lob you're
trying to write.
Thus, in php4.3.x writeTemporary always tries to create CLOB, and
you're using it to write BLOB.
The example in docs should be changed, I'm working on new docs atm.
------------------------------------------------------------------------
[2004-01-29 11:46:35] tony2001@php.net
ok, I'll take a look at it soon.
------------------------------------------------------------------------
[2004-01-29 11:16:59] ceco at noxis dot net
in examle 2 on
http://www.php.net/manual/en/function.ocinewdescriptor.php
it is used exactly like that, only it is clob
I cannot use php 5, I made workaround converting blob to hex, sending
it as clob and then reconverting it to binary ;-))
a little strange and cpu intensive but works and since it is not very
often used I'll have to leave it that way
------------------------------------------------------------------------
[2004-01-29 09:21:23] tony2001@php.net
Don't use writeTemporary, it's not intended for writing persistent
LOB's.
You should use save() or you can upgrade to PHP5 and use $lob->write()
method.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27083
--
Edit this bug report at http://bugs.php.net/?id=27083&edit=1