You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Boehmann, Brant" <BO...@eetcorp.com> on 2000/10/30 18:10:49 UTC

mod_perl and CGI.pm not working

I am running Apache version 1.3.9 and mod_perl version 1.21.  I am trying to
use CGI.pm version 2.74, but have also tried 2.68 and get the same problem.

If I use this script:

#!/usr/bin/perl
use strict;
use CGI qw(:standard);

print "Content-type: text/html\n\n";
print "<HTML><BODY BGCOLOR='#FFCC66'>";
print "<b>Date: ", scalar localtime, "</b><br>\n";
print "%ENV: <br>\n", map { "<B>$_</B> = $ENV{$_} <br>\n" } keys %ENV;
print "</BODY></HTML>";

This line is in my http.conf:
	Include conf/addon-modules/mod_perl.conf

mod_perl.conf:

LoadModule perl_module  /usr/lib/apache/libperl.so
AddModule mod_perl.c

Alias /perl/ /home/httpd/perl/
<Location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options ExecCGI
</Location>

Alias /ges/ /home/httpd/ges/
<Location /ges>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options ExecCGI
</Location>

<Files *.pl>
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
</Files>

Whenever I comment out the "use CGI;" line, the script works fine.  If I
uncomment it, the browser will just keep looking until it times out.

If I "use DBI;" or "use CGI::Minimal;" or "use Strict;" that all works fine,
but "use CGI;" will never display anything

I get this in my /var/log/httpd/error_log:

[Mon Oct 30 05:44:04 2000] [notice] child pid 14829 exit signal Segmentation
fault (11)

this only happens with "use CGI;"

Please help, I would really like to use the CGI.pm that I am familiar with.

Thanks in advance



Brant Boehmann
Developer
EET Corporation
(865) 671-7800
http://www.eetcorp.com



Re: mod_perl and CGI.pm not working

Posted by "G.W. Haywood" <ge...@www.jubileegroup.co.uk>.
Hi there,

On Mon, 30 Oct 2000, Boehmann, Brant wrote:

> I am running Apache version 1.3.9 and mod_perl version 1.21.  I am
> trying to use CGI.pm version 2.74, but have also tried 2.68 and get
> the same problem.

I don't know if it's likely to be the cause of the problem, but you're
using a fairly old mod_perl which had a number of problems which could
cause segfaults.  Try upgrading to 1.24?  And 1.3.14 would probably be
a good idea too, there were cross-site scripting issues with 1.3.9 as
I recall.

Have you read the Guide?  <http://perl.apache.org/guide>

You might want to move more towards mod_perlish ways of doing things
now you're a mod_perl hacker...

73,
Ged.