Hi all. I'm having a problem uploading images and inserting them as BLOBs into a PostgreSQL db.
The file is uploading okay, and I can verify its existence with file_exists, but whenever the query is executed to insert it as a BLOB, I get the following error:
Warning: pg_query() query failed: ERROR: lo_import: can't open unix file "/var/tmp/phpTTaOif": No such file or directory in /u1/trng/gateway/_upload/input_file.php on line 21
This is the query:
INSERT INTO pic_db (name, picoid) VALUES ('circle-bottom.gif', lo_import('/var/tmp/phpTTaOif'))
Why would it give me an error telling me the file doesn't exist, when I can run file_exists() right before the query is executed and it tells me it exists.
Additionally, the following is the error message when I execute the query from the command line, even when I try to pass it a file which I KNOW exists in /var/tmp.
ERROR: lo_import: can't open unix file "/var/tmp/US7360": No such file or directory
Any ideas?
Thanks in advance,
Pablo