From: Michelle Konzack <linux4michelle@tamay-dogan.net>
To: pgsql-php@postgresql.org
Subject: Re: store data files encryptypted in database.
Date: Sat, 11 Oct 2008 16:46:03 +0200
Message-ID: <20081011144603.GP3032@tamay-dogan.net> (raw)
In-Reply-To: <BAY108-DAV74F0B81BD22FF982A3641A3350@phx.gbl>
References: <BAY108-DAV74F0B81BD22FF982A3641A3350@phx.gbl>
Hello X,
Am 2008-10-10 12:32:28, schrieb elmarkivp:
> hi, i'm trying to store data files encryptypted in postgres 8.1 database but i can`t make it works.
> this is what i'm doing.
>
> $link = pg_connect("host=$dbhost user=$dbuser password=$dbpwd dbname=$dbname") or die(pg_last_error($link));
> $fp = fopen($tmp_name, "rb");
> $file= fread($fp, filesize($tmp_name));
> fclose($fp);
> $file=pg_escape_bytea($file);
> $sql = "INSERT INTO SOME_TABLE (bytea_file) VALUES (pgp_sym_decrypt_bytea($file,somepass,cipher-algo=aes256))";
^^^^^^^^^^^^
> ERROR: column "content_of_bytea_file" does not exist ( "content_of_bytea_file" is $file)
^^^^^^^^^^^^^^^^^^^^^^^
There are two different columns.
I think, you should RECHECK your PHP script.
Greetings
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
+49/177/9351947 50, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
Attachments:
signature.pgp (application/pgp-signature, 188B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: linux4michelle@tamay-dogan.net
Subject: Re: store data files encryptypted in database.
In-Reply-To: <20081011144603.GP3032@tamay-dogan.net>
References: <BAY108-DAV74F0B81BD22FF982A3641A3350@phx.gbl> <20081011144603.GP3032@tamay-dogan.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox