|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-02-05 21:24 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 19:00:02 2025 UTC |
Description: ------------ We are using the Oracle 9.2 client and Apache 2.0.48 Saving a blob using the OCINewDescriptor method "save" causes "ocCILobWrite: illegal parameter value in OCI lob function" warning. All other data for the insert is saved but the blob data is lost. I tested using PHP 5 and there was no problem. I went back and used PHP 4.3.4 and there was no problem either. It seems 4.3.5RC2 is the problem. Reproduce code: --------------- $blob_data = fread(fopen("/file_location/file_name", "r"), filesize("/file_location/file_name")); $dbcon = OCILogon($dbUser,$dbPassword,$dbName); $lob = OCINewDescriptor($dbcon, OCI_D_LOB); $query = "INSERT INTO TABLE_NAME (TABLE_NAME_ID,BLOB_DATA) ". "VALUES (TABLE_NAME_SEQ.NEXTVAL, EMPTY_BLOB()) RETURNING ". BLOB_DATA into :BLOB_DATA"; $result = ociparse($dbcon,$query); OCIBindByName($results,":BLOB_DATA",$lob,-1,OCI_B_BLOB); OCIExecute($results,OCI_DEFAULT); $lob->save($blob_data); $lob->free(); Expected result: ---------------- $lob->save($blob_data); should return 1 and the data should be saved into the BLOB_DATA column of the table. Actual result: -------------- The rest of the data is saved into the table but $lob->svae($blob_data); returns nothing, the "ocCILobWrite: illegal parameter value in OCI lob function" error appears and no BLOB data is saved.