problem with uploading a file to oracle.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mahmood
Forum Newbie
Posts: 8
Joined: Fri Mar 19, 2004 5:23 pm

problem with uploading a file to oracle.

Post by mahmood »

I am trying to upload a file to a BLOB field in oracle. I expected a simple INSERT would do the job. this is my form page (simple version):

<form enctype="multipart/form-data" action="upload.php" method="post">
<input name="userfile" type="file">
<input type="submit" value="Send File">
</form>

in my upload.php page I have:
...
$sql="INSERT INTO uploaded_files ....
...

So why do I get this error:
"Warning: OCIStmtExecute: ORA-01465: invalid hex number "

It seems that uploading a file is not like inserting some text into a field. Could somebody give a simple code needed for my upload.php page.
mahmood
Forum Newbie
Posts: 8
Joined: Fri Mar 19, 2004 5:23 pm

Post by mahmood »

well ...
I changed the field to CLOB (instead of BLOB) and i don't get the error message, now i need to know what script downs them.
Post Reply