Re: [INTERFACES] Perl, Postgres, Web !!!

From: Stephen J Lombardo <lombardos(at)Mail(dot)Montclair(dot)edu>
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Perl, Postgres, Web !!!
Date: 1998-08-24 07:05:17
Message-ID: 35E110AD.25BF11A7@mail.montclair.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Saeid,

How many records are you trying to select? As a general rule Perl has a nasty
habit of trying to pull everything into main memory. In other words if you are
trying to "select * from table;" and you have an extraordinarily large table
then this might be giving you a problem. The other thing I would try is make
sure that you are properly connecting to the database. Throw in some
debugging code to make sure that the connections go through ok. Without
seeing your code It is impossible to tell you if that is your problem, but it
may be your program. The third thing is try to telnet to the port Postgres
should be listening on, by default it is port 5432. Watch to see if your
telnet client can connect. If it doesnt that would indicate that while
Postgresql is running it is not listening on your port for connections. If
this is the case then you will have to modify how you start postmaster so that
it will use TCP/IP instead of listening on the standard Unix socket. Also
for good measure make sure your www user has read AND execute permissions on
your cgi. With some Unices it is neccesary for your www user to have both
permissions to properly run a cgi, not just the execute permission. If none
of this works as a last option try running the Test script that is packaged
with the Postgresql distribution...If the test script doesnt work then you
know for sure that there is something going on with postgresql...

Hope that helps.

===
Stephen J Lombardo
Java Programmer/Network Technician
Montclair State University
http://www.is.montclair.edu/~lombardos
===

Telephone VdB Foods Ltd wrote:

> Hi Everyone,
>
>
> The question has probably been asked a few times before. Please accept
> my aplologies for not noticing that.
>
> Here is my story as a new user of postgres. I am connecting to
> postgres using perl and my interface is web. Things do not work and I
> feel that something to do with permission is causing this.
>
> I have check the web / CGI script. a simple perl script works fine as
> long as I have nothing to do with postgres. I have a perl script which
> does a simple query on a table as "www" user which exiasts in the
> database. This is the user the web server runs the CGI as.
>
> The script seems to run, but it never seems to come up with results.
> Netscape calims it is loading / transfering data.
>
> I tested the same perl script as the user "www" on command line and
> everything works fine.
>
> I even thought this might have something to do with host
> authentication nad I tried it with netscape fromt the local host as
> well as a remote one.
>
> I even removed all host authentication to test things in pg_hba.conf
> like:
>
>
> host all 0.0.0.0 0.0.0.0 trust
>
>
> What is going on? Please someone send me some mail, some clues, some
> flame! , etc.
>
>
>
> Many thanks for help in advance.
> Saeid.
>

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peter T Mount 1998-08-24 07:40:20 Re: [INTERFACES] JDBC and getTableTypes problem
Previous Message Jim Carroll 1998-08-24 02:33:15 JDBC and getTableTypes problem