I completely understand what you are saying, thanks for the reply.
Here is what happen. We, first couldn't connect so someone asked if phpinfo
showed PSQL in the output and it did not.
This lead us to believe we had a compilation problem with PHP, Apache or
Postgres. So we stopped looking for problems in our php code and began
looking for problems in the way it was compiled our tools.
There are many references to pgsql.so and we could not get this shared
object to get created. We have pgsql.o however. Thus, we started renaming
the file and copying it to different strategic directories to try to get
PGSQL to show up in phpinfo.
Now, I assume PHPINFO is simply verifying the PGSQL connection by trying to
connect to it under the Apache account name?
The problem I have with all this, as a newbie and a long time C/C++ guy, is
that you have no idea where the problem lies. It would be better if PHPINFO
would at least show PGSQL is part of the environment but that it simply
couldn't connect, eh? Maybe there is a way and I am just not seeing it
I am just getting my feet wet with PHP so I don't know how PHP libraries or
includes work yet. I chalk this up to the fact I am still GREEN in this
area. Under C/C++, DLLS always expose their inards regardless.
"Devrim Gunduz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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.
> Devrim GUNDUZ
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> Web : http://devrim.oper.metu.edu.tr
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php