You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by Randy <rj...@wideopenwest.com> on 2008/08/19 01:26:51 UTC

Apache::ASP Installation Issue

I'm running Windows Server 2003, with Apache (IndigoApache) which has
mod_perl installed (not configured.I don't know how/where to start) and have
tried repeatedly to install Apache::ASP via CPAN.

 

The installation always errors out at the same point, and goes something
like this:

 

cpan> install Apache::ASP

Running install for module 'Apache::ASP'

Running make for C/CH/ChAMAS/Apache-ASP-2.61.tar.gz

        Has already been unwrapped into directory C:
\INDIGO~1\perl\cpan\build\Apache-ASP-2.61-sF3vmC

Could not make: Unknown error

Warning <usually harmless>: 'YAML' not installed, will not store persistent
state

Running make test

        Can't test without successful make

Running make install

        Make had returned bad status, install seems impossible

 

 

Anyway, that's what I usually get back, and have no idea how to correct it.

 

I've been to http://www.apache-asp.org/install.html for directions...they
seem like they were written in another language, and refer to directories
that don't exist on my machine.I've been to the Yahoo groups, but none of
the posts seem to reflect my situation, and the questions regarding
installation on Windows seem to go unanswered, and I've even been to the IRC
channel, but there was an increidble lag between asking a question and
getting a reply (I was there for 5 hours, and got only two questions asked
in reply to my first question).

 

I really need help getting this done, and have no idea where else to ask, or
even who to ask for that matter.

 

Any suggestions? (other than put it on a xxnix box)


RE: Apache::ASP Installation Issue

Posted by Randy <rj...@wideopenwest.com>.
Thanks a bunch! I'll get right on these configuration changes, and let you
know how they worked out.

I had a feeling (being so inexperienced with Apache configuration) that it
wasn't even set up. Somehow, being a long-time Windows user, I sort of
expected the installer to take care of basic configuration.

I will definitely look into what global.asa does and where to put it, as
well as how to secure it. Thanks!

<Directory "D:\Xxxxxxx\xxxxxx"> refers to the home directory of my website
(the names were changed to protect the innocent) and they do work. 

I will also look into what State.Dir is.

Since this is a Windows box...yes, it's probably using the system user by
default.

Thanks again.

R

-----Original Message-----
From: Warren Young [mailto:warren@etr-usa.com] 
Sent: Tuesday, August 19, 2008 11:20 PM
To: Apache-ASP List
Subject: Re: Apache::ASP Installation Issue

Randy wrote:
> 
> In the browser, I get the asp script.

That means Apache::ASP isn't even being called for the page, which is an 
Apache configuration problem, not a problem with Apache::ASP.  (Problems 
with Apache::ASP or the ASP pages themselves show up as complaints in 
error_log.)

In all of what you posted about your httpd.conf contents, I don't see 
that you've actually configured Apache to use Apache::ASP.  This is from 
the top of the configuration section of the manual:

PerlModule Apache::ASP
<Files ~ (\.asp)>
    SetHandler  perl-script
    PerlHandler Apache::ASP
    PerlSetVar  Global .
    PerlSetVar  StateDir /tmp/asp
</Files>

I posted something much like it in my initial reply to you.  It applies 
just as well on Windows as on Linux.  Apache is Apache.

> I don't seem to have a global.asa file anywhere on the server. 

I don't know that Apache::ASP fails to work without it, but you do want 
it.  Here's the default one:

	http://apache-asp.org/eg/global.asa

Search for global.asa on apache-asp.org for more on what it does.

Also see the documentation for the Global configuration option to see 
how to change where global.asa lives:

	http://apache-asp.org/config.html#Global

In the snippet above, it appears it's telling Apache::ASP to look in the 
same directory as your .asp files, which may not be a good thing if you 
want the contents of your global.asa to be secret.  You can use the 
Global directive to put global.asa outside the document tree, so Apache 
won't serve it.  Alternately, you can configure Apache to never serve *.asa.

> 	<Directory "D:\Xxxxxxx\xxxxxx">

Are you sure this section actually works?  From the Apache platform 
notes for Windows:

> because Apache uses Unix-style names internally, you must use forward
> slashes, not backslashes

http://httpd.apache.org/docs/2.0/platform/windows.html

> What is the StateDir? Never heard of it.

It's in the manual: http://apache-asp.org/config.html#StateDir

> By "the httpd user" to whom do you refer?

The user that Apache runs under.  It might not be your user account.  If 
you run it as a Windows service, by default, it runs as the SYSTEM user.

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


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


Re: Apache::ASP Installation Issue

Posted by Warren Young <wa...@etr-usa.com>.
Randy wrote:
> 
> In the browser, I get the asp script.

That means Apache::ASP isn't even being called for the page, which is an 
Apache configuration problem, not a problem with Apache::ASP.  (Problems 
with Apache::ASP or the ASP pages themselves show up as complaints in 
error_log.)

In all of what you posted about your httpd.conf contents, I don't see 
that you've actually configured Apache to use Apache::ASP.  This is from 
the top of the configuration section of the manual:

PerlModule Apache::ASP
<Files ~ (\.asp)>
    SetHandler  perl-script
    PerlHandler Apache::ASP
    PerlSetVar  Global .
    PerlSetVar  StateDir /tmp/asp
</Files>

I posted something much like it in my initial reply to you.  It applies 
just as well on Windows as on Linux.  Apache is Apache.

> I don't seem to have a global.asa file anywhere on the server. 

I don't know that Apache::ASP fails to work without it, but you do want 
it.  Here's the default one:

	http://apache-asp.org/eg/global.asa

Search for global.asa on apache-asp.org for more on what it does.

Also see the documentation for the Global configuration option to see 
how to change where global.asa lives:

	http://apache-asp.org/config.html#Global

In the snippet above, it appears it's telling Apache::ASP to look in the 
same directory as your .asp files, which may not be a good thing if you 
want the contents of your global.asa to be secret.  You can use the 
Global directive to put global.asa outside the document tree, so Apache 
won't serve it.  Alternately, you can configure Apache to never serve *.asa.

> 	<Directory "D:\Xxxxxxx\xxxxxx">

Are you sure this section actually works?  From the Apache platform 
notes for Windows:

> because Apache uses Unix-style names internally, you must use forward
> slashes, not backslashes

http://httpd.apache.org/docs/2.0/platform/windows.html

> What is the StateDir? Never heard of it.

It's in the manual: http://apache-asp.org/config.html#StateDir

> By "the httpd user" to whom do you refer?

The user that Apache runs under.  It might not be your user account.  If 
you run it as a Windows service, by default, it runs as the SYSTEM user.

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


RE: Apache::ASP Installation Issue

Posted by Randy <rj...@wideopenwest.com>.
Sorry for the personal reply. I'm not used to this list yet.

In the browser, I get the asp script.

In the error log, I get nothing. (It seems the server thinks it's cool to
just throw the script out there.)

I don't seem to have a global.asa file anywhere on the server. (Did a search
for it...came up empty.)

Directories:

	<Directory "D:\Xxxxxxx\xxxxxx">
		Options FollowSymlinks  Includes
		AllowOverride None
		Order allow,deny
		Allow from all
	</Directory>

That directory is the "home" directory for my site. It contains index.php
and several other php scripts

<Directory "C:/IndigoPerl/apache/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

That directory is what came pre-installed on IndigoPerl as the "home".
There's nothing there.

<Directory "C:/IndigoPerl/apache/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

<Directory "C:/IndigoPerl/php">
	AllowOverride None
	Options None
	Order allow,deny
	Allow from all
</Directory>

The previous two directories seem to be where Apache is supposed to look for
cgi's or php.exe.

<Directory "C:/IndigoPerl/apache/htdocs">
    Options Indexes FollowSymLinks MultiViews ExecCGI +Includes
</Directory>

That one seems to tell Apache that in htdocs which options to use.

<Directory "C:/IndigoPerl/apache/htdocs">
  <IfModule mod_perl.c>
    # Files directive is only valid in Directory section
    <Files ~ "\.(pl|cgi)$">
        SetHandler perl-script
        PerlHandler ModPerl::Registry
        Options ExecCGI
        allow from all
        PerlSendHeader On
    </Files>
  </IfModule>
</Directory>

That one seems to tell Apache how to handle Perl scripts in the htdocs
directory.

As for permissions, all of the directories above seem to be configured
properly...at least as far as I understand Apache.

What is the StateDir? Never heard of it.

By "the httpd user" to whom do you refer?

Thanks.


-----Original Message-----
From: Warren Young [mailto:warren@etr-usa.com] 
Sent: Tuesday, August 19, 2008 8:44 PM
To: Apache-ASP List
Subject: Re: Apache::ASP Installation Issue

Redirecting this back to the list.  Please don't respond to me 
personally.  I'm here to support Apache::ASP, not to support you in 
particular. :)

Randy wrote:
> It now has Apache::ASP installed on it, but still won't run ASP scripts.

What do you get in the browser?

What do you get in Apache's error log?

What does your global.asa file contain, and where is it?

Can you post the relevant sections of your httpd.conf file, and say what 
is in all of the directories it references?

Do all of these directories have appropriate permissions?  Especially, 
does the StateDir exist, and is it writeable by the httpd user?

> How do I call out a directory, and specify ASP scripts to run in it, in
the
> httpd.conf file? (I think this may be the end of it).

There is an answer, but it's the wrong question.  If you configure 
Apache::ASP to run on the server as a whole and it doesn't work, 
restricting it to a single directory won't make it work.

Once you get ASP working globally, we can talk about tightening it down 
to a single directory.  Let's not complicate things yet.

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


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


Re: Apache::ASP Installation Issue

Posted by Warren Young <wa...@etr-usa.com>.
Redirecting this back to the list.  Please don't respond to me 
personally.  I'm here to support Apache::ASP, not to support you in 
particular. :)

Randy wrote:
> It now has Apache::ASP installed on it, but still won't run ASP scripts.

What do you get in the browser?

What do you get in Apache's error log?

What does your global.asa file contain, and where is it?

Can you post the relevant sections of your httpd.conf file, and say what 
is in all of the directories it references?

Do all of these directories have appropriate permissions?  Especially, 
does the StateDir exist, and is it writeable by the httpd user?

> How do I call out a directory, and specify ASP scripts to run in it, in the
> httpd.conf file? (I think this may be the end of it).

There is an answer, but it's the wrong question.  If you configure 
Apache::ASP to run on the server as a whole and it doesn't work, 
restricting it to a single directory won't make it work.

Once you get ASP working globally, we can talk about tightening it down 
to a single directory.  Let's not complicate things yet.

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


Re: Apache::ASP Installation Issue

Posted by Warren Young <wa...@etr-usa.com>.
Randy wrote:
> Any suggestions? (other than put it on a xxnix box)

The common wisdom says that Windows is easier to use.  In a lot of 
cases, this is true.

This is not one of those cases.  Apache::ASP is a native of *ix systems, 
and so it's far easier to install it there.  You usually don't have to 
set up Apache, mod_perl, or compilers on a Linux box...they're just 
assumed to be there, already working, or at least easy to install.  The 
lack of this support environment is what you're running into on Windows.

Even if you have an absolute requirement to use Windows for the final 
product, I would suggest getting started with Linux first.  That will 
give you necessary experience with Apache and Apache::ASP which will 
help you to understand the Windows instructions.

You don't have to get dedicated hardware for this, or install Linux. 
You can download all this, ready to go.  First, get VMware Player, here:

	http://www.vmware.com/download/player/download.html

Now we need a VM.  Download VA-LAMP-vmware-*.zip from:

	http://virtualappliances.net/download/vmware/

This VM is set up for basic Apache serving already.  There are several 
more steps required to add Apache::ASP support, but all are easy.  It 
might take 15 minutes, all told.

0. Install VMware Player.  It wants to reboot the host machine, but it 
isn't really necessary.

1. Extract the contents of the VM zip file to the place you want the VM 
to live.  You'll need 2.5 GB of disk space.

2. Open the VA-LAMP folder and double-click the VA-LAMP.vmx file you 
find inside.  This will start the VM in VMware Player.

3. After the VM boots -- it won't take long! -- you'll see it report the 
IP address that your LAN's DHCP server assigned it.  Write it down.  For 
the sake of the discussion below, we'll say it's 192.168.0.42

4. Put that IP address into a web browser to test that the VM is 
working.  You should see the VM's welcome page.

5. Say Start > Run and put \\192.168.0.42\wwwroot into the Open field 
and hit Enter.  This will connect to the directory holding the content 
being served from the VM by Apache.  Log in as admin/admin when 
prompted.  You should see index.html.  Delete it, or move it off the VM.

6. Now we have to create the new Apache configuration file, and it's 
easier to do it in Windows and transfer it over, rather than transcribe 
it into the VM directly.  You'll need a Unix-aware text editor for this. 
  If you don't have one, I can recommend Notepad++, which is free:

	http://notepad-plus.sourceforge.net/

Paste the text below into a new text file, adjusting the first two lines 
as desired.  If you're using Notepad++, say Format > Convert to UNIX 
Format.  Then save it out as \\192.168.0.42\wwwroot\asp.conf to write a 
copy of the new configuration file to the VM's virtual hard disk.

-------------- 8< ---------- cut here --------- 8< -------------

ServerAdmin your@email.here.com
ServerName my-first-apache-asp-server
DocumentRoot /var/www/html

<Directory "/var/www/html">
     Allow from all
     AllowOverride None
     DirectoryIndex index.asp
     Options FollowSymLinks
     Order allow,deny
</Directory>

<IfModule mod_perl.c>
     PerlModule Apache::ASP

     <Files ~ (\.asp)>
         SetHandler perl-script
         PerlHandler Apache::ASP
         PerlSetVar Global /var/www/html
         PerlSetVar StateDir /tmp/asp
     </Files>
</IfModule>

-------------- 8< ---------- cut here --------- 8< -------------

7. Click back into the VMware Player window, log in as root/root, and 
give the following commands to set up Apache.  First, we'll blow away 
the default Apache config and put our new one in its place:

	# cd /etc/apache2/sites-enabled
	# rm *
	# mv /var/www/html/asp.conf ../sites-available
	# ln -s ../sites-available/asp.conf .

We've started with a minimal VM, so we don't have the C compilers and 
such on the system yet.  Let's go get 'em:

	# apt-get update
	# apt-get install build-essential

Now we need to set up CPAN:

	# cpan

Answer the configuration questions, accepting all defaults.

Now we can install Apache::ASP and its prerequisites:

	cpan> install Bundle::Apache::ASP
	cpan> exit

Now, the clincher: we need to restart Apache, to load our new configuration:

	# apache2ctl restart

This should run quickly and silently.  It if complains, you did 
something incorrect above.

9. Pop out of the VM (Ctrl-Alt), open your Unix-aware text editor again, 
ensure it's in Unix line ending mode, and write this:

	<% print "Hello, world!" %>

Save it out as \\192.168.0.42\wwwroot\index.asp and hit the refresh 
button in your web browser.  The page should change to say "Hello, 
world!"  If so, congratulations, Apache::ASP is working.  Continue on 
with the examples at http://apache-asp.org/eg/

If all of this is too much for you to deal with, best just use Windows' 
own flavor of ASP.

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