#25109 [Opn->Fbk]: pgsql causes segmentation fault
| From: | iliaa@php.net | Date: | Wed, 27 Aug 2003 00:06:43 +0000 |
| Subject: | #25109 [Opn->Fbk]: pgsql causes segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-46723@lists.php.net to get a copy of this message | ||
ID: 25109
Updated by: iliaa@php.net
Reported By: cunha17 at uol dot com dot br
-Status: Open
+Status: Feedback
Bug Type: PostgreSQL related
Operating System: Redhat Linux 9.0 - Kernel 2.4.21
PHP Version: 4CVS-2003-08-20
New Comment:
Could you please generate a backtrace of the crash and supply the query
you've run to trigger it.
Previous Comments:
------------------------------------------------------------------------
[2003-08-20 18:30:25] cunha17 at uol dot com dot br
The same problem happened with the latest PHP:
PHP4-STABLE-200308202130
------------------------------------------------------------------------
[2003-08-16 11:50:51] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-08-16 11:47:12] cunha17 at uol dot com dot br
Description:
------------
I found out that pgsql functions cause segmentation fault if the
connection user has no read access on pg_ system tables.
I'm using John Lim's ADOdb class to access a PostgreSQL 7.2.4
database.
This problem has nothing to do with apache since it happens with the
CLI interface too.
Reproduce code:
---------------
With an empty postgresql installation, I created an empty database,
connected to it, created an user and set all privileges on this new
database to this user.
Connected as the new user on the new database I created some tables.
When trying to access this new tables with PHP and ADOdb classes, I got
a segmentation fault. At the very end, when running with strace, I got
a message before the segmentation fault saying:
'pg_class access denied'
When I grant read access on this table to the new user, I got:
'pg_attribute access denied' and so on...
When I grant read access to all pg_* tables, the problem disappear and
PHP runs ok.
Expected result:
----------------
PgSQL Error: Access denied to pg_* system table
or something like that.
Actual result:
--------------
Segmentation Fault if the connection user has no read access on system
tables
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25109&edit=1