Re: Fwd: Re: mod_perl + PostgreSQL implementation - Mailing list pgsql-general

From alex b.
Subject Re: Fwd: Re: mod_perl + PostgreSQL implementation
Date
Msg-id 3ECB91DF.2050807@gmx.de
Whole thread Raw
In response to Fwd: Re: mod_perl + PostgreSQL implementation  (Network Administrator <netadmin@vcsn.com>)
List pgsql-general
as I once mentioned... it's solved now... but here you'll the info you
asked for.

Network Administrator wrote:
> Sorry, I forget to reply to the list with this...
>
> ----- Forwarded message from keith@vcsn.com -----
>     Date: Tue, 20 May 2003 16:33:12 -0400
>     From: keith@vcsn.com
> Reply-To: keith@vcsn.com
>  Subject: Re: [GENERAL] mod_perl + PostgreSQL implementation
>       To: "alex b." <mailinglists1@gmx.de>
>
> Hey Alex,
>
> I use mod_perl for most of my heavy duty apps but I feel your pain because it
> took me awhile to get it going too- for a chat/e-communities type site no less.
>
> Two questions I have:
>
> 1) What is your httpd.conf look like?  Do you have all the necessary components
>    to have Apache process the script as a mod_perl script?
I believe so...

#################> current httpd.conf (snippets)

LoadModule perl_module        libexec/libperl.so

     alias /perl/ /SERVER/perl/

     PerlModule Apache::Registry CGI::Simple Pg
     <Location /perl>
         SetHandler perl-script
         PerlHandler Apache::Registry
         Options +ExecCGI
         allow from all
         PerlSendHeader On
     </Location>


/////////////////> current httpd.conf (snippets)




> 2) Have you checked the environment vars to see if you have the mod_perl
>    vars?
>
> For instance, on my 2.0.45 server, I get this...
>
> MOD_PERL="mod_perl/1.99_09"
>
> On an 1.3.x server, I have
>
> MOD_PERL="mod_perl/1.25"
>
http://localhost/perl/printenv shows::

SERVER_SOFTWARE="Apache/1.3.27 (Unix) mod_perl/1.27"
SCRIPT_FILENAME="/SERVER/perl/printenv"
PERL_SEND_HEADER="On"
MOD_PERL="mod_perl/1.27"


> I have a script called printenv.mpl that does this.  Its the same as
> printenv.cgi but I use .mpl to identify my mod_perl scripts.

that's a very good idea!

by the way... does...

my $r = shift;
$r->print("output");

..help so much? I mean what exactly is the difference between
$r->print(""); and print ""; ??



this was alex sending to you straight from the north pole so much for
now, folks! - gotta go'n shave my neck!
;)




> Quoting "alex b." <mailinglists1@gmx.de>:
>
>
>>hello...
>>
>>I'm getting really frustrated now... I have nearly no hair left...
>>
>>after hours of trying I finally intalled mod_perl(1.3.27) and a new
>>apache(1.3.27) - I istalled/compiled mod_perl as DSO/apxs...
>>
>>everything works fine, really - except loading the Pg module - not
>>DBD::Pg, but Pg (v. 2.0.2). if I do start a script like that (in the
>>mod_perl directory) then the harddrive starts workig like on steroids
>>and soon the browser just stops receiving data or stops waiting for the
>>server. I took a look at the syslog and found a few glorious lines
>>(about 20) - each request for that script kills on daemon.
>>
>>
>>May 19 00:36:07 TOXIC6 kernel: Out of Memory: Killed process 18677 (httpd).
>>
>>-------------- code --------------
>>use Pg;
>>use strict;
>>
>>print "content-type: text/html\n\n";
>>
>>print "TEST!";
>>-------------- code --------------
>>
>>...and thats all... the daemon gets killed because of "no memory"
>>
>>
>>
>>the thing is that I can start the very same script in /cgi-bin and it'll
>>work flawlessly!
>>
>>there have been discussions about a memory leak - but I don't know if it
>>has been fixed yet...



pgsql-general by date:

Previous
From: Joseph Healy
Date:
Subject: Re: TIMESTAMP SUBTRACTION
Next
From: Tom Lane
Date:
Subject: Re: TIMESTAMP SUBTRACTION