Gossamer Forum
Home : General : Perl Programming :

Some ignorant newbie mod_perl questions

Quote Reply
Some ignorant newbie mod_perl questions
Hi there,

Not sure if this is the right place to post this since I don't really have any programming questions, but I trust that the post will be moved if necessary.

I recently moved from a shared to a dedicated server, which means that I now have access to mod_perl. While most of the site in question is coded in PHP, there are a few large chunks of it (those running GT scripts) that are done in perl/cgi. Since a lot of the site's traffic is in those sections, and it is now an option, it seems like I should consider asking my webhost to enable mod_perl. Some questions:

1) mod_perl is currently available but "turned off". If I ask my host to "turn it on" will that have any impact on the functioning of current cgi scripts? Will they continue to run as cgi processes until I explicitly designate that they should run under mod_perl?

2) Roughly what is involved in making the move from cgi to mod_perl? Basically we're talking about LinksSQL, GForum, and DBManSQL. Is it just a function of flipping some switch, or is it more complicated?

3) Are there any big risks involved that I should be aware of?

4) Is there any good online mod_perl tutorial that you could recommend for future questions?

Thanks very much for any advice.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [hennagaijin] Some ignorant newbie mod_perl questions In reply to
Quote:
1) mod_perl is currently available but "turned off". If I ask my host to "turn it on" will that have any impact on the functioning of current cgi scripts? Will they continue to run as cgi processes until I explicitly designate that they should run under mod_perl?

If your host sets it up properly then yes. mod_perl scripts normally go under /perl and cgi scripts /cgi-bin

Quote:
2) Roughly what is involved in making the move from cgi to mod_perl? Basically we're talking about LinksSQL, GForum, and DBManSQL. Is it just a function of flipping some switch, or is it more complicated?

Almost like flipping a switch. You just need to make some changes to httpd.conf and create a startup.pl file....thorough instructions are in the mod_perl readme that comes with all GT products.

Quote:
3) Are there any big risks involved that I should be aware of?

None that I can think of...what lines were you thinking along?....as long as you have enough memory (256MB+ is fine).

Quote:
4) Is there any good online mod_perl tutorial that you could recommend for future questions?

Checkout perl.apache.org
Quote Reply
Re: [Paul] Some ignorant newbie mod_perl questions In reply to
Thanks for the reply.

As far as changes to the httpd.conf file, can that also be done on an .htaccess level? Could I, for example, designate certain subdirectories of cgi-bin to use mod_perl and others to use regular cgi?

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Quote Reply
Re: [hennagaijin] Some ignorant newbie mod_perl questions In reply to
No, I think it needs to go into httpd.conf, but within httpd.conf you can do what you require. Using the Location directive you can specify one or more mod_perl directories.
Quote Reply
Re: [hennagaijin] Some ignorant newbie mod_perl questions In reply to
Hi,

1. I highly recommend having it done right, and setup using two apache's as described:

http://perl.apache.org/...l#Apache_s_mod_proxy

If they just add mod_perl to the main apache, this can really boost the system resources required, and isn't a very good implementation.

2. With our applications, nothing. You do need to confirm with the applications author that a program works under mod_perl before putting it under mod_perl though. The only thing you need to do is add some lines to your mod_perl startup file (as described in each apps README.mod_perl).

3. The main issues are of system resources, and having enough memory. I suspect your host will just add mod_perl to the main apache, and that will use up a lot more memory then needed, and if you don't have enough, it will slow things down.

4. Go crazy on this site:

http://perl.apache.org/docs/1.0/guide/

for everything mod_perl.

If you have any more questions, don't hesitate to ask.

Cheers,

Alex
--
Gossamer Threads Inc.