Gossamer Forum
Quote Reply
mod_perl
I finally tried to make the jump to running Gmail under mod_perl. I ran into some of the initial problems other seem to have faced and solved in this forum.

So far I have it set-up so that a config check of my httpd.conf and startup.pl files checks ok and shows the Gmail preloading text, but when I actually try to start the httpd daemon, it says OK, but doesn't really start. Doesn't show the preloading text and no errors. If I comment out the "PerlRequire..." line in httpd.conf it starts up just fine, but obviously without mod_perl.

Any ideas?
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] mod_perl In reply to
Im not sure whether this will hwlp but you could try:

apachectl configtest
Quote Reply
Re: [RedRum] mod_perl In reply to
Unfortunately I don't have the apachectl script installed, but I did run "/usr/sbin/httpd -t" which is supposed to check the configuration of httpd.conf. Not sure if they are equivalent. Doing that returns:
Quote:
Preloading Gossamer Mail scripts into mod_perl:
. . . . . . . . . . . . . . . . . . .
All scripts compiled and loaded ok!
But then httpd doesn't actually start when I try to start it.
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] mod_perl In reply to
Hi,

Look in the server error log to see what's going wrong. Should tell you why it didn't start up.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] mod_perl In reply to
Nope, I get a line that it is shutting down, but nothing after that, even though the start command says it started 'OK'. When I comment out the PerlRequire line it starts up and I see the startup message in the log file.
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] mod_perl In reply to
OK, so now I have updated my server to the latest versions of apache and mod_perl. I restarted the httpd daemon and it actually starts. The message
Quote:
Preloading Gossamer Mail scripts into mod_perl:
. . . . . . . . . . . . . . . . . .
All scripts compiled and loaded ok!
shows up in my log file. So everything seems ok.

But the Persistant Env value for mod_perl in admin still says zero????

Is there any way to really tell if mod_perl is working? There are other modules I included in the startup file, like DBI and CGI.
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] mod_perl In reply to
If Persistent Env still says 0 that means while you have mod_perl seutp, Gossamer Mail is still set to be run under CGI.

Make sure that you have something like:

<Location /cgi-bin/gmail/>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
</Location>

in your httpd.conf file. This tells Apache that when you go to /cgi-bin/gmail/ URL, not to run programs as regular CGI, but rather to run them via mod_perl.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] mod_perl In reply to
Woo-hoo! I'm getting mod_perl(1) now and it's working in gmail admin. I followed the lead of what I think GT is doing and aliased /perl/ to my gmail cgi-bin. So if I understand correctly anytime I substitue /perl/ for /cgi-bin/ in a gmail url is should run under mod_perl.

As I mentioned, doing /perl/admin/... works fine, but when I try to access anything /perl/user/... I get "document contained no content". It works fine when I use /cgi-bin/user/...

The alias directive is:
Alias /perl/ /home/webmail/cgi-bin/
then I have
<Location /perl>
.
.
.
</Location>

So what am I doing wrong?
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] mod_perl In reply to
Another oddity. Most of what I have tried in gmail admin seems to be working under mod_perl, but when I try to look at undeliverables I get the same "document contained no data"...

A little more investigation and a variety of things aren't working in the admin. It seems like anytime it tries to interact with mySQL I get the "document contained no data" message. I also get "child pid xxx exit signal Segmentation fault" in the error_log.

Any ideas?

Additional... I also have php4 installed and just came across some info that suggests that this combo may not play well together (apache, mod_perl, php and mysql). Can anyone corroborate this, or know of a fix?
Michael Coyne
seaturtle.org

Last edited by:

mcoyne: Mar 8, 2002, 8:00 AM
Quote Reply
Re: [mcoyne] mod_perl In reply to
I'll just keep talking to myself...

When I disable php, it is installed as a dynamic module, mod_perl works just fine. My is gmail zippy under mod_perl.

A really cool thing I've noticed, I also enables speedyCGI, and when I'm not using mod_perl speedyCGI kicks in and vice versa.

sweet

Would still like to be able to use php, so if anyone has any ideas on how I can configure php to work with this lot please let me know.
Michael Coyne
seaturtle.org
Quote Reply
Re: [mcoyne] mod_perl In reply to
Hi,

I've heard PHP and mod_perl do not play well together when both built as DSO's (conspiracy?).

You could try building mod_perl statically, and PHP dynamically. We've had success with that.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] mod_perl In reply to
Pirate ....I use both as DSO's too. Do you know what problems can occur?

Last edited by:

RedRum: Mar 10, 2002, 2:04 PM