[Templates] problems preloading Template.pm under Apache/mod_perl in Mac OS X
Stas Bekman
stas@stason.org
Thu, 14 Mar 2002 01:38:50 +0800
Tim Noll wrote:
> Stas Bekman wrote:
>
>>a broken Exporter?
>>
>>does it work after you do:
>>
>>perl -pi -e 's/(O_CREAT|O_WRONLY|O_TRUNC)/Fcntl::$1/g'
>>/Library/Perl/darwin/Template/Document.pm
>>
>
> OK, we tried your suggestion and fully qualified those constants on line 251
> of Template/Document.pm. Now it still freezes with "PerlModule Template" in
> the conf file, but trying "use Template ();" in the startup file works! But
> then when he stops the web server, this appears in the Apache error log:
Try this trick:
http://perl.apache.org/guide/debug.html#Using_the_Perl_Trace
to figure out where it hangs:
> *** malloc[1583]: Deallocation of a pointer not malloced: 0x17d4cc; This
> could be a double free(), or free() called with the middle of an allocated
> block; Try setting environment variable MallocHelp to see tools to help
> debug
>
> One other thing of note: He uses the System Preferences > Sharing control
> panel to start and stop Apache. He hasn't yet tried it from the command
> line. Is that a possible source of this problem?
sorry, I don't know what this does. Has he heard of apachectl?
>>Please stay away from perl 5.6.0 -- it's *very* buggy. use 5.6.1
>>instead, which is very stable.
>>
>
> My colleague tried to upgrade to 5.6.1 at one point but ran into a lot of
> problems due to various other dependencies. He ended up restoring the
> original Perl binaries from CD. If anyone knows of a reliable way to upgrade
> to 5.6.1 without trashing anything else, please share.
I suggest to try harder to install 5.6.1 and most likely his problems
will go away without wasting too much time on these issues. Try to seek
help on the appropriate forums/news/mailing lists. There must be someone
releasing the binary package.
> P.S. My colleague also noticed that that trying to preload Apache::Util
> causes Apache to freeze, as well; however, no error messages appear in the
> error log at all.
that is probably a question for the modperl list, but the first answer you
would get will be upgrade to 5.6.1 first. Of course I don't discard the
possibility of a potential bug in mod_perl, but chances are very low, since
so many people are using Apache::Util/Template and there were no reports
of any problems with loading.
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/