Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use CGI; use Authen::Captcha; my $query = new CGI; # # Generate captcha # # Note: in a real script, the data_folder should be placed # outside the www document root # my $captcha = Authen::Captcha->new( data_folder => '/var/www/html/captcha', output_folder => '/var/www/html/captcha', ); my $captcha_characters = 4; my $MD5 = $captcha->generate_code($captcha_characters); # # Print report # print $query->header(); print "<html><body><img src=\"/captcha/$MD5.png\"></body></html>";
Under mod_perl (1.3.x), this code causes a segmentation fault when it tries to run $captcha->generate_code(4). When not under mod_perl, it runs fine. In the same server I've run thousands of lines of perl code using DBI, CGI, and other assorted modules, so I don't think my mod_perl installation is mis-configured. I believe it was setup with DO_EVERYTHING=1 (or similar), the lack of which seemed to be the source of many of my early mod_perl woes a year ago.
There's some really big brains here, so I'm hoping that someone can point me to the instruction I need to fix this problem, and hopefully learn a little along the way.
Thanks for the responses in advance, and thanks for all the other great posts that keep me lurking here daily for months on end.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Authen::Captcha Segmentation Fault Under mod_perl
by tachyon (Chancellor) on Mar 15, 2004 at 23:28 UTC |