Thanks for the explanation and the details Stas,

I'm actually OK with everything in my startup.pl being available to all
virtual hosts.
After reading the post from Thomas I went back in and removed all the
"perlModule" and "perlRequire" lines from the virtual host containers and
loaded everything at once outside of the VHosts and it seems to have
corrected my problems. Its good to know if there is a need to divide it the
ability is there to do so (looks like I was doing it but without creating a
new parent interpreter).

I am using mod_perl 1.99.08, this is my second dev server and I've found
that RH is OK as a OS but I've had MUCH better results leaving it at that
and installing Apache, mod_perl and mySql etc. from source and not as part
of the RH install or using RPMs..

Congrads to all you guys on mod_perl, I've heard about it and things like
fastCGI for what seems like forever but until we got to the point where we
were getting 1.8 million hits a day and everything was crawling as it was
99% perl, I never took the time to get into it - after the 300% performance
increase seen after converting the entire site I simply cannot live without
it and I refuse to do even the smallest projects using anything else.

-Chris



>> -----Original Message-----
>> From: Stas Bekman [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, March 18, 2003 5:34 PM
>> To: Thomas Klausner
>> Cc: Modperl
>> Subject: Re: Using a Startup.pl
>>
>>
>> Thomas Klausner wrote:
>> > Hi!
>> >
>> > On Tue, Mar 18, 2003 at 01:39:41PM -0500, Chris Faust wrote:
>> >
>> >
>> >>I'm running mod_perl 2 on RedHat with Apache 2.0.44 and I'm
>> using NamedBased
>> >>Virtual Hosting in apache (so I have a number of virtual hosts
>> and apache
>> >>directs properly based on hostname).
>> >>
>> >>I use a startup.pl to load up common things like DBI, CGI,
>> HTML::Template
>> >>etc..
>> >>
>> >>Should I have just a single startup.pl and will that work with
>> all virtual
>> >>hosts? Or should I have a startup.pl per virtual host.
>> >
>> >
>> > AFAIK, and with mod_perl 1.x, having multiple startup.pl's
>> makes no sense as
>> > they all get executed during server startup and in the main namespace.
>>
>> That's correct only for mod_perl 1.0.
>>
>> For mod_perl 2.0 this depends on whether 'PerlOptions +Parent'
>> is set or not.
>> If it is each vhost can have their own startup.pl (only that
>> vhost will ever
>> execute/see the code that run from it). It's documented here:
>> http://perl.apache.org/docs/2.0/user/config/config.html#C_Parent_
>>
>> (though as someone reported PerlOptions +Parent doesn't work inside the
>> <Location> container, I haven't had a chance to work on it yet.)
>>
>> However this is all new code and not very tested yet, so I won't
>> be surprised
>> if there are problems with it. If you have problems report them
>> as explained here:
>> http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems
>>
>> __________________________________________________________________
>> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
>> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
>> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
>> http://modperlbook.org http://apache.org   http://ticketmaster.com


Reply via email to