Steve D wrote:
For the purpose of clarifying the issue, are you saying there is contention between the two handlers which are declared within the httpd.conf, as it has been setup in this case? That is, since a handler has been declared within by the directory section [/var/www/perl] and another for the location [/CurrDate], the two handlers are contenting against the one other? Therefore, in this case, although <Location /CurrDate> has been defined, the default handler <Directory /var/www/perl> is overriding the CurrDate name space[!?] Would someone please clarify.
Eh? Did you: s/per-script/perl-script/ and tried again?
There was a bug in older mod_perl versions, and you'd get the "Can't locate module" error when in fact, the module has failed to compile. Please try again with the cvs version.From studying this further, I noticed I forgot to prefix the <Location/CurrDate> section with a PerlModule directive. Consequently, the following line has been added to the perl.conf file. PerModule: MyApache::CurrDate However, now, with this addition, when starting the Apache the following exception is genereated: httpd failed. The error was: Starting httpd: [Fri Jan 10 12:11:15 2003] [error] Can't locate MyApache/CurrDate.pm in @INC (@INC contains: /var/www/perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/Apache2 /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at (eval 4) line 3. You'll notice from this message, the path does include '/var/www/perl' and the perl module which is being called is within the '/var/www/perl/MyApache/' directory. (For good measure it was also placed within '/var/www/perl' without a resolution to the run time exception.)
Incidentally, the format of the configuration file which is being used in this case has been adapted from the article "Introducting mod_perl Handlers". I've also been using "Getting Your Feet Wet with mod_perl". These resources can be respectfully found at http://perl.apache.org/docs/2.0/user/handlers/intro.html#What_are_Handlers_ and http://perl.apache.org/docs/2.0/user/intro/start_fast.html#Handler_Modules I found these to be very helpful for a newcomer.
Great.
It should work with 'PerlResponseHandler Modperl::Registry'. What was the error message (please start a new thread on this one, don't continue here)This later article was especially beneficial for it connected several fregmented thoughts together [at least in my own learning curve] into good concise working document. In my case, I found it helpful to get a perl script working [as a first measure] and then proceed to the use of a response handler. However, I did run across a problem with how the perl script name space was defined. The first example [in the article "Getting Your Feet Wet"] would not work when I used the syntax "PerlResponseHandler Modperl::Registry" nor "PerlResponseHandler Modperl::Registry::handler". Consequently, I changed the format to "PerlHandler ModPerl::Registry::handler" and then my test script was able to run.
Consequently, at this stage, a few questions remain. 1) Since, at least in this situation, I had to adapt the handler from being PerlResponseHandler to PerlHandler in order to get the perl scripting to work, does that also mean the same adaptation will be necessary in order to yield a result from a reponse handler for the CurrDate.pm module? 2) Once again, how do I instruct Apache to properly locate the CurrDate.pm file? [Stas, you may have already given me the answer to this latter question but more clarity is still needed.] 3) When I include the provision of the line "PerModule: MyApache::CurrDate" within the perl.conf file, Apache throws an exception and failed to start.
s/PerModule:/PerlModule/ I don't know where did you take PerModule: from. __________________________________________________________________ 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