pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: [INTERFACES] Perl, Postgres, Web !!!
2+ messages / 2 participants
[nested] [flat]

* Perl, Postgres, Web !!!
@ 1998-08-24 08:27 Telephone VdB Foods Ltd <Saeid.Sadeghi@unilever.com>
  1998-08-24 07:05 ` Re: [INTERFACES] Perl, Postgres, Web !!! Stephen J Lombardo <lombardos@Mail.Montclair.edu>
  0 siblings, 1 reply; 2+ messages in thread

From: Saeid.Sadeghi@unilever.com @ 1998-08-24 08:27 UTC (permalink / raw)
  To: pgsql-interfaces

     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.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [INTERFACES] Perl, Postgres, Web !!!
  1998-08-24 08:27 Perl, Postgres, Web !!! Telephone VdB Foods Ltd <Saeid.Sadeghi@unilever.com>
@ 1998-08-24 07:05 ` Stephen J Lombardo <lombardos@Mail.Montclair.edu>
  0 siblings, 0 replies; 2+ messages in thread

From: Stephen J Lombardo @ 1998-08-24 07:05 UTC (permalink / raw)
  To: 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.
>




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1998-08-24 08:27 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-08-24 08:27 Perl, Postgres, Web !!! Telephone VdB Foods Ltd <Saeid.Sadeghi@unilever.com>
1998-08-24 07:05 ` Stephen J Lombardo <lombardos@Mail.Montclair.edu>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox