perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Byers" <r.ted.by...@sympatico.ca>
Subject I see only the text of the script rather than whatever the script is supposed to produce
Date Tue, 23 Dec 2003 18:16:11 GMT
I am sure this is a FAQ, but the solution presented in the FAQ I found there
doesn't quite work.

I am using the Windows binary distribution that has  ssl, mod_perl,
Apache::ASP, Embperl, HTML::Mason, Template::Toolkit, and PHP.  I am not
much interested in EmbPerl yet, but in the new year I'll be taking a look at
HTML::Masoc and Template::Toolkit.

SSL and PHP are working, but I am having problems with ASP and Perl.

I have Mozilla pointed to localhost on starup.  I copied graph.pl and
input.data to htdocs, and if I point Mozilla at it, I see a web page
apparently produced by it, but not the graph itself.

I copied the ASP/eg to an eg directory in htdocs, and again, pointing at the
index.html file in it displays only the text of a script.

Here are the last few lines of httpd.conf (immediately after my virtual
hosts defined to get SSL working):

Alias /perl/ "I:/PerlAndApache/Apache2/PerlScripts/"

PerlModule Apache::Registry
<Location /perl>
      SetHandler perl-script
      PerlHandler Apache::Registry
      Options +ExecCGI
      PerlSendHeader On
      allow from all
</Location>

<Location /perl-status>
      SetHandler perl-script
      PerlHandler Apache::Status
      Options +ExecCGI
      PerlSendHeader On
      allow from all
</Location>

<Directory $DOCUMENT_ROOT/eg >
      SetHandler perl-script
      PerlHandler Apache::Registry
      Options +ExecCGI
      PerlSendHeader On
      allow from all    Options FollowSymLinks
    AllowOverride All
 </Directory>

However, if I point Mozilla at localhost/perl-status, I see the text I
expected to see.

I must have missed something, but I am having trouble determining what.
And, does the settings provided for eg make all files there pass through
perl or only those with the 'pl' extension.  If the former, how would I
configure perl to process only files with the 'pl' extension (and ASP - if
that is the way ASP is supposed to work) and treat the rest as ordinary
HTML.

Now, I have what I think is a related problem, and that is, my preference is
to keep my cgi scripts, regardless of whether they're PHP, Perl ASP, or
whatever, outside of the htdocs directory tree (i.e., I have a PerlScripts
directory in Apache2, which also has htdocs in it, and if I have in htdocs a
subdirectory called MyProject, any Perl scripts it needs would be in
PerlScripts/MyProject - so the directory tree in the latter would mirror
that in MyProject in htdocs).  At the same time, I am working on a couple
projects where my colleagues have not kept the scripts separate from the
documents.  Is there a way I can accomodate both kinds of setup?  I want my
preferences to prevail whenever I am working on my own projects but their's
when I am working on their projects.  Can this be done without too much
pain?  If so, how?

My colleague suggested I use MS' IIS, but when I saw the Apache distribution
I installed has ASP support, I decided to try to get it working first.

I don't know if this has anything to do with my problem, but when I first
tried to configure Apache for Perl, having added the perl location in
httpd.conf, Apache refused to start complaining that the file
Apache/Registry.pm could not be found.  I found one in the modperl
subdirectory in Perl/site/lib/modperl that seemed to make sense, and so I
copied that to the directory Perl/site/lib/Apache, and this initial error
went away and Apache again started.

Any help would be appreciated.

Thanks,

Ted



---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Mime
View raw message