Re: Perl 5.6+mod_perl bugs (was Re: Win32 mod_perl binary [update])
On Tue, 30 May 2000, Jeremy Howard wrote: * Many problems appear running under Apache::DB. In particular, Apache::Util::escape_uri causes a segfault under Apache::DB in some circumstances, as does Apache::Request::register_cleanup (when called as a class rather than an object method) * Slight changes to code can cause a segfault for no apparent reason. For instance, under Apache::DB, the following causes a crash (from Email::Valid)... $Resolver = new Net::DNS::Resolver unless $@; ...while the following works fine... if (!$@) { $Resolver = new Net::DNS::Resolver; } the debugger is often tripped up inside mod_perl (inside perl_call_sv i should say), i've had problems with 5.005_03 too. if you can post tiny examples that trip up the debugger, i can look into them. the debugger is another case of 'broken' code, it assumes it will only be run from the command line with the -d switch (which is why the Apache::DB wrapper is required). it's certainly worth doing what we need to so it's happy inside mod_perl.
Perl 5.6+mod_perl bugs (was Re: Win32 mod_perl binary [update])
Randy Kobes said: - the patch posted to this list a few days ago by Jeremy Howard for an error about a "Bizarre copy of HASH ...": In Carp::Heavy, change 'DB' to 'DB_tmp': Line 39: while (do { { package DB_tmp; @a = caller($i++) } } ) { Line 79: @a = @{DB_tmp::args}; # must get local copy of args In CGI::Carp, change Line 257: FROM: my $message = shift; TO: my ($message) = @_; %%% also fixes a problem with both Apache-ASP and HTML-Mason under Perl-5.6.0 of the (0.6) mod_perl binary. The minimal prerequisites for both ASP and Mason are included in this binary. Although these changes get around the immediate segfaults and errors when using Perl 5.6, there are a few things to be aware of if you are looking at using mod_perl + Perl 5.6. Basically, when problems in mod_perl come up after moving to Perl 5.6, I've found that they tend to appear as segfaults in httpd, which I never used to get under 5.005_03. Problems I'm aware of: * I'm still working with Lincoln to properly fix CGI::Carp (the patch I submitted, and his original code, ignores all but the first argument to die()). Unfortunately any attempt to access beyond the 1st argument causes a segfault under certain circumstances * Many problems appear running under Apache::DB. In particular, Apache::Util::escape_uri causes a segfault under Apache::DB in some circumstances, as does Apache::Request::register_cleanup (when called as a class rather than an object method) * Slight changes to code can cause a segfault for no apparent reason. For instance, under Apache::DB, the following causes a crash (from Email::Valid)... $Resolver = new Net::DNS::Resolver unless $@; ...while the following works fine... if (!$@) { $Resolver = new Net::DNS::Resolver; } You may well not hit any of these problems, since many only come up with certain combinations of modules loaded. Having said that, I'd recommend avoiding Perl 5.6 for the time being until these issues are sorted out, since if you do hit one of these issues they are a real pain to debug. -- Jeremy Howard [EMAIL PROTECTED]
Win32 mod_perl binary [update]
Hi, For those who've obtained the Win32 mod_perl/Perl binary (version 0.6) at ftp://theoryx5.uwinnipeg.ca/pub/other/ in the last few weeks, there's a few things that may be of interest: - thanks to a pointer by Daniel Lange to a patch for mod_info for Win32, I've placed at the above ftp site the dll for mod_info - this can simply be dropped into C:\Apache\modules. Also at this site is the dll for Tim Costello's mod_ntlm. - the patch posted to this list a few days ago by Jeremy Howard for an error about a "Bizarre copy of HASH ...": In Carp::Heavy, change 'DB' to 'DB_tmp': Line 39: while (do { { package DB_tmp; @a = caller($i++) } } ) { Line 79: @a = @{DB_tmp::args}; # must get local copy of args In CGI::Carp, change Line 257: FROM: my $message = shift; TO: my ($message) = @_; %%% also fixes a problem with both Apache-ASP and HTML-Mason under Perl-5.6.0 of the (0.6) mod_perl binary. The minimal prerequisites for both ASP and Mason are included in this binary. - in the binary I forgot to include the apache icons folder - these are now at the above ftp site. Also, in C:\Apache\conf\httpd.conf-perl I neglected to change back the Directory "/Apache/htdocs" directive pointing to DocumentRoot, which has confused a couple of people. best regards, randy kobes