I'm stuck using oracle and php.
I'm trying to save a word document that a user uploads (the field name in the form is lob_resume) into an oracle table.
I'm getting the following error:
"Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-00911: invalid character on line 62"
Any help will be much appreciated...
Here is my code:
$filename = $_FILES['lob_resume']['tmp_name'];
$handle = fopen($filename, "r");
$str = fread($handle, filesize($filename));
fclose($handle);
$str = addslashes($str);
$str = str_replace("'","''",$str);
$lob = OCINewDescriptor($inet_database, OCI_D_LOB);
$stmt = OCIParse($inet_database, 'INSERT INTO ATRK_RSM (RSM_ID,ATRK_ID,USR_ID,REQ_ID,CRE_BY,CRE_DTM,RSM)
VALUES(ATRK_RSM_SEQ.nextval,123,$EMPID,$REQNUM,123,SYSDATE,EMPTY_BLOB()) RETURNING RSM INTO :BLOBDATA');
OCIBindByName($stmt, ':BLOBDATA', $lob, -1, OCI_B_BLOB);
OCIExecute($stmt, OCI_DEFAULT) or die("did not work");
if ($lob->save($str)) {
OCICommit($inet_database);
echo "File upload successful!";
}
else {
echo "\nCouldn't upload Resume\n"; exit;
}
$lob->free();
OCIFreeStatement($stmt);