Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id CEE0964FCD3 for ; Mon, 13 Oct 2008 09:02:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 42995-04 for ; Mon, 13 Oct 2008 09:02:02 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from server4.pinguin-hosting.de (server4.pinguin-hosting.de [88.198.11.108]) by postgresql.org (Postfix) with ESMTP id B4F9F64FCCE for ; Mon, 13 Oct 2008 09:02:01 -0300 (ADT) Received: from tp570.private.tamay-dogan.net (unknown [194.250.145.134]) (Authenticated sender: linux4michelle@tamay-dogan.net) by server4.pinguin-hosting.de (Postfix) with ESMTPA id 06A895F7963 for ; Mon, 13 Oct 2008 14:02:06 +0200 (CEST) Received: by tp570.private.tamay-dogan.net (sSMTP sendmail emulation); Mon, 13 Oct 2008 14:01:06 +0200 Received: by tp570.private.tamay-dogan.net (TDSSMTP outspool); Sat, 11 Oct 2008 16:46:03 +0200 Date: Sat, 11 Oct 2008 16:46:03 +0200 From: Michelle Konzack To: pgsql-php@postgresql.org Subject: Re: store data files encryptypted in database. Message-ID: <20081011144603.GP3032@tamay-dogan.net> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xexMVKTdXPhpRiVT" Content-Disposition: inline In-Reply-To: X-Message-Flag: Improper configuration of Outlook is a breeding ground for viruses. Please take care your Client is configured correctly. Greetings Michelle. X-Disclaimer-DE: Eine weitere Verwendung oder die Veroeffentlichung dieser Mail oder dieser Mailadresse ist nur mit der Einwilligung des Autors gestattet. Organization: Tamay Dogan Network X-Operating-System: Linux tp570 2.4.27-2-686 X-Uptime: 16:40:08 up 21:13, 10 users, load average: 0.15, 0.13, 0.10 X-Homepage: http://www.debian.tamay-dogan.net/ User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.627 tagged_above=0 required=5 tests=DATE_IN_PAST_24_48=1.627 X-Spam-Level: * X-Archive-Number: 200810/12 X-Sequence-Number: 3909 --xexMVKTdXPhpRiVT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > $link =3D pg_connect("host=3D$dbhost user=3D$dbuser password=3D$dbpwd dbn= ame=3D$dbname") or die(pg_last_error($link)); > $fp =3D fopen($tmp_name, "rb"); > $file=3D fread($fp, filesize($tmp_name)); > fclose($fp); > $file=3Dpg_escape_bytea($file); > $sql =3D "INSERT INTO SOME_TABLE (bytea_file) VALUES (pgp_sym_decrypt_by= tea($file,somepass,cipher-algo=3Daes256))"; =20 ^^^^^^^^^^^^ > ERROR: column "content_of_bytea_file" does not exist ( "content_of_by= tea_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 --=20 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) --xexMVKTdXPhpRiVT Content-Type: application/pgp-signature; name="signature.pgp" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFI8LwqC0FPBMSS+BIRAh5aAJ9NcIynh7Ax4fUiheee8b0IXfZcRwCcC/sx jhN+FuAA2uQ4kJCpZUBArAg= =g3tf -----END PGP SIGNATURE----- --xexMVKTdXPhpRiVT--