Wow, lots of quick replies. Sorry, yes its the TT INTERPOLATE function.The "interpolate bug" (forget who termed it that) is a known Perl regex problem where strings above 32kb cause a core dump. From the Template::Manual::Config POD: "Note that a limitation in Perl's regex engine restricts the maximum length of an interpolated template to around 32 kilobytes or possibly less. Files that exceed this limit in size will typically cause Perl to dump core with a segmentation fault.".
I assumed it was fixed in Perl 5.8, and anyway my templates are _considerably_ smaller than that. And the strange thing is it only happens when running under mod_perl (Registry or PerlRun), never as a native CGI application. Does anyone successfully run CA with TT under mod_perl? Maybe it's a Windows thing? I don't have access to mod_perl/Apache on a UNIX system (yet).
On Fri, 22 Apr 2005, RA Jones <suppressed> wrote:
I know it's been quiet on the CA list recently. So a Q to liven it up. This one was originally posted on the Templates mailing list but got no takers so I want to try again here (I only use TT via CA so it's sort-of relevant).It concerns the Perl interpolate bug, but at a much smaller file size than the 32kb quoted value. Templates as small as 15 lines (1 -2 kb) are affected. I am assuming it is the same problem - browser pop-up alert says 'Document contains no data' and Apache error log reports '[notice] Parent: child process exited with status 3221225477 -- Restarting.' Problem goes away if I turn interpolate off.Peppering the template with empty variables (ie $) allows the system to run OK under mod_perl, but is very irritating as TT works fine without this when run via CA (and stand-alone) as a standard CGI application.Also I am using ActivePerl 5.8.6, and I thought this was a Perl 5.6 regex file size limit problem. The rest of the setup is Apache/2.0.52 (Win32) PHP/4.3.10 mod_ssl/2.0.52 OpenSSL/0.9.7e mod_perl/1.99_20-dev Perl/v5.8.6 (actually the Perl-5.8-win32-bin-0.9 binary by Randy Kobes). I think Template::Parser is implicated in this somewhere - I have v2.82, distributed as part of the Template Toolkit version 2.14, released on 04 October 2004.Does anyone know how to fix this, as variable interpolation is one of the reasons I use TT in place of HTML::Template.
--
Richard Jones
Leeds, UK
mailto:suppressed
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.