Received: from sunny.pacific.net.au (sunny.pacific.net.au [210.23.129.40]) by hub.org (8.10.1/8.10.1) with ESMTP id e8BCBEf29841 for ; Mon, 11 Sep 2000 08:11:15 -0400 (EDT) Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id RAA22452 for ; Mon, 11 Sep 2000 17:10:10 +1100 (EST) Received: from tomcat.designmagick.com (ppp93.dyn145.pacific.net.au [210.23.145.93]) by wisma.pacific.net.au with ESMTP id RAA29953 for ; Mon, 11 Sep 2000 17:10:03 +1100 (EST) Message-Id: <4.3.2.7.2.20000911163621.00aa3b10@mail.pharm.usyd.edu.au> X-Sender: tomcat@mail.pharm.usyd.edu.au X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Mon, 11 Sep 2000 16:43:50 +1000 To: pgsql-php@postgresql.org From: Chris Subject: saving files in a database Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Archive-Number: 200009/1 Hi everyone, I'm trying to write a script that will let a user save a file into a database. This is my SQL.. $sql="insert into scripts (id, submittedby, description, script, scriptfile) values (nextval('scripts_id_seq'), '$loginname', '$description', '$script', lo_import('$userfile'))"; This is the error I receive when I try and run the sql - Warning: PostgresSQL query failed: ERROR: You must have Postgres superuser privilege to use server-side lo_import(). Anyone can use the client-side lo_import() provided by libpq. in put-file.php on line 4 OK, I understand the error message, but I don't want to use libpq, I don't want to learn C at the moment. How do I fix it? Change my sql or php? Update my permissions table? This is it at the moment.. users=# \z Access permissions for database "xxxx" Relation | Access permissions ------------------+--------------------- scripts | {"=","wwwrun=arwR"} scripts_id_seq | {"=","wwwrun=arwR"} wwwrun is what apache is running as.. Any suggestions would be great. Thanks Chris.