Re: Fwd: Re: mod_perl + PostgreSQL implementation

From: "alex b(dot)" <mailinglists1(at)gmx(dot)de>
To: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Fwd: Re: mod_perl + PostgreSQL implementation
Date: 2003-05-21 14:49:03
Message-ID: 3ECB91DF.2050807@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)vcsn(dot)com -----
> Date: Tue, 20 May 2003 16:33:12 -0400
> From: keith(at)vcsn(dot)com
> Reply-To: keith(at)vcsn(dot)com
> Subject: Re: [GENERAL] mod_perl + PostgreSQL implementation
> To: "alex b." <mailinglists1(at)gmx(dot)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(at)gmx(dot)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...

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-05-21 14:50:45 Re: TIMESTAMP SUBTRACTION
Previous Message alex b. 2003-05-21 14:34:34 caching query results