I just stumbled into this EXACT same problem today while attempting to get mod_perl up and running.
MacOSX 10.3.3
Perl v5.8.1-RC3
Apache 1.3.29
mod_perl 1.26


My 'stupid' test script:
  #!/usr/bin/perl
  print "Content-type: text/plain\n\n";
  print "mod_perl rules!\n";

Carl's first example script below works for me, too. I also found an article by David Wheeler over at MacDevCenter regarding building Apache with mod_perl and a little snippet of httpd.conf code works, also:

  PerlModule Apache::Status
  <Location /perl-status>
    SetHandler  perl-script
    PerlHandler Apache::Status
  </Location>

Has anyone solved this issue? I'm contemplating installing up to date versions of perl and mod_perl and give that a shot.. (Three days later.. Naw, I'm just really tired.)

--

Benjamin Adair

Central Office Database Programmer/Analyst
Cancer & Leukemia Group B
Phone: 773-702-6731
Fax: 312-345-0117
Email: badair at uchicago dot edu
Web: http://www.calgb.org/

On Nov 24, 2003, at 4:00 AM, Carl Cunningham wrote:

Hi folks,

I'm having a devil of a time with something that should be very easy. I'm
using mod_perl and CGI::Application for some pokey stuff, and my scripts run
just dandy in a CGI environment, but outputs absolutely nothing in my
mod_perl setup.


I'm using:
MacOSX 10.3
Perl 5.8.1 (the standard delivered version)
Mod_perl 1.26 (the standard delivered version)
Apache 1.3.28 (the standard delivered version)

perl -MApache -e 'print $Apache::VERSION' = 1.27
perl -Mmod_perl -e 'print $mod_perl::VERSION' = 1.26
perl -MCGI -e 'print $CGI::VERSION' = 3.00

Here's my Apache::Registry Configuration out of the httd.conf

PerlModule Apache::Registry
<Location /registry>
  SetHandler      perl-script
  PerlHandler     Apache::Registry
  Options         +ExecCGI
</Location>

Now this is where it gets weird. Following script works dandy:
my $r = Apache->request;
$r->content_type("text/html");
$r->send_http_header;
$r->print("Hi There!");

But this script only generates output in a CGI environment:


use strict ;
use CGI ;
my($q) = new CGI ;
print   $q->header,
$q->start_html('hello world'),
$q->h1('hello world'),
$q->end_html;


????

--
Carl K. Cunningham
Roberts� interactive GmbH
E-Mail: initials of first and last name, at 'roberts' dot 'de'
----------------------------------------------------------------------- -----


Reply via email to