From: | Chris <tomcat(at)weirdness(dot)com> |
---|---|
To: | pgsql-php(at)postgresql(dot)org |
Subject: | saving files in a database |
Date: | 2000-09-11 06:43:50 |
Message-ID: | 4.3.2.7.2.20000911163621.00aa3b10@mail.pharm.usyd.edu.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Louis Bertrand | 2000-09-18 13:21:07 | European character sets? |
Previous Message | Doug Semig | 2000-08-28 04:22:50 | Re: Getting arrays from a result set? |