Hey,
I'm having troubles storing BLOB's in Oracle 8.1.5.2 running on RedHat 6.2. I've compiled PHP 4.0pl2 as a DSO module, and I'm running Apache 1.3.12.
The problem is that the record never gets inserted, the script just gets a timeout. Here's the script i'm trying to use:
<?php
if(!isset($lob_upload) || $lob_upload == 'none'){
?>
<form action="upform.php" method="post" enctype="multipart/form-data">
Upload file: <input type="file" name="lob_upload"><br>
<input type="submit" value="Upload"> - <input type="reset">
</form>
<?php
} else {
$conn = OCILogon("user", "pass", "service");
$lob = OCINewDescriptor($conn, OCI_D_LO😎;
$stmt = OCIParse($conn,"INSERT INTO tblPersonInfo (PERSONID, PICTURE) VALUES(1, EMPTY_BLOB()) RETURNING PICTURE INTO 😛ICTURE");
OCIBindByName($stmt, '😛ICTURE', &$lob, -1, OCI_B_BLO😎;
OCIExecute($stmt, OCI_DEFAULT);
if($lob->savefile($lob_upload)) {
OCICommit($conn);
echo "Blob successfully uploaded\n";
}else{
echo "Couldn't upload Blob\n";
}
OCIFreeStatement($stmt);
OCILogoff($conn);
}
?>
Has anybody else ever got this problem ?
Thanks.
Ernst