saving files in a database - Mailing list pgsql-php

From Chris
Subject saving files in a database
Date
Msg-id 4.3.2.7.2.20000911163621.00aa3b10@mail.pharm.usyd.edu.au
Whole thread Raw
List pgsql-php
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.


pgsql-php by date:

Previous
From: Doug Semig
Date:
Subject: Re: Getting arrays from a result set?
Next
From: Louis Bertrand
Date:
Subject: European character sets?