On Sun, 21 Jul 2002, Eric wrote:

> Our Apache web server runs under a unix account (of course).
> In the PostgreSQL world, you have to create a database user under the 
> same name like so:
> ./createuser webserver
> Once we did this -- everything worked.
> What puzzles me though is that PHPINFO() doesn't even show that pgsql is
> compiled in when apparently it was there all along.

Well, you are wrong... You do not need to use the same username of you web 

I mean, if you do NOT add a username parameter in your connection 
definition, then will use the username that you are running on.

Let me explain like this:

- If you connect via PHP and write
pg_connect ("dbname=mydb"); --> PHP will think that you want to connect 
with the username that apache runs (maybe nobody, maybe another user)

- If you connect via psql and write
[devrim@oper devrim]$ psql mydb --> Then psql will assume that the 
username that it will use while connecting to PostgreSQL is "devrim".

So, use postgres user for your connections... Or use another username and 
grant access to that user.

Best regards.




Web : http://devrim.oper.metu.edu.tr

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to