Skip site navigation (1) Skip section navigation (2)

Warning: PostgreSQL query failed: ERROR: [my_table]: Permission denied in [my_php_program]

From: Barker <barkerds(at)snybufaf(dot)buffalostate(dot)edu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Warning: PostgreSQL query failed: ERROR: [my_table]: Permission denied in [my_php_program]
Date: 2002-08-09 11:20:50
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Can someone tell me why my PHP command [pg_exec ($database, $line );]
causes the "Permission denied" error.
I am trying to use PostgreSQL 7.2, PHP4, and Web-based apache user
I have focused on pg_hba.conf; -i option; and making sure that
user apache is a valid Unix user.
I have included the parts that may be helpful.

Error Message:
octave ... INSERT INTO use VALUES ('2002-08-08', '18:04:34',
'', '3222', 'Mozilla/4.72
[en] (X11; U; Linux 2.2.14-5.0 i686)' );

Warning: PostgreSQL query failed: ERROR: use: Permission denied. in
on line 113

A2.php:  (lines 112 & 113)
       print("$dbName ... $line<p>");    /* TEST */
       pg_exec ($database, $line );

host   all trust
host       all    trust
local   all                     trust

su -l postgres -s /bin/sh -c "/usr/bin/pg_ctl -o "-i"  -D $PGDATA -p
/usr/bin/postmaster start  > /dev/null 2>&1" < /dev/null

firewall off

Proof that apache user is authorized as a Unix user:
bash-2.05a$ psql -U apache octave
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal
       \g or terminate with semicolon to execute query
       \q to quit


Steve Barker

pgsql-bugs by date

Next:From: pgsql-bugsDate: 2002-08-12 10:02:32
Subject: Bug #735: Server crash when using dynamic SQL and disabling recursion
Previous:From: Bruce MomjianDate: 2002-08-08 23:28:34
Subject: Re: Bug #732: LIMIT clause bugs with

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group