Anyone have experience storing a BLOB in Oracle using PEAR as a database abstraction layer?
I've done the task using mySQL and the native mySQL/PHP calls as in the article "Binary Data + MySQL + PHP" on phpbuilder.com:
___________
$data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
$result=MYSQL_QUERY("INSERT INTO binary_data (description,bin_data,filename,filesize,filetype) VALUES('$form_description','$data','$form_data_name','$form_data_size','$form_data_type')");
____________
When I try to simply convert the database calls to PEAR ontop of ORACLE there is obviously stuff going on that I have no clue about. When I try uploading a 30kb image, I get the following error:
[nativecode=ORA-00972: identifier is too long ]
When I try uploading a 2kb text file (simply a '.'), I get the following error:
insert into documents values (17, '.') [nativecode=ORA-01465: invalid hex number ]
So then I added a text file "CCCCCC" I don't get an error. When I output the data, I get:
烫?br />
Any suggestions where I could look?
I've done the task using mySQL and the native mySQL/PHP calls as in the article "Binary Data + MySQL + PHP" on phpbuilder.com:
___________
$data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
$result=MYSQL_QUERY("INSERT INTO binary_data (description,bin_data,filename,filesize,filetype) VALUES('$form_description','$data','$form_data_name','$form_data_size','$form_data_type')");
____________
When I try to simply convert the database calls to PEAR ontop of ORACLE there is obviously stuff going on that I have no clue about. When I try uploading a 30kb image, I get the following error:
[nativecode=ORA-00972: identifier is too long ]
When I try uploading a 2kb text file (simply a '.'), I get the following error:
insert into documents values (17, '.') [nativecode=ORA-01465: invalid hex number ]
So then I added a text file "CCCCCC" I don't get an error. When I output the data, I get:
烫?br />
Any suggestions where I could look?