My local fire department is interested in redoing their web presence entirely. I'm all game to help with that, but they also need some emergency help because their current application is flat out broken. This means actually diving into their current code, and stabilizing it before we even talk about moving to a more current platform (cough...Ruby on Rails...).
Having been part of these rescue missions before, I know that the problems are usually deeper than the description: "there's just a few things that need tweaking and fixing, no big deal really". In anticipation of this, I've already taken the code I copied off of their production server (yes, some organizations still do this), put it into a git repo, and checked it out to 2 separate computers.
The further complication? The entire app is in classic ASP. And all three of my computers are Macs.
But I'm not the last person who will ever have this problem, so we're going to follow along as I get this dinosaur up and running here on my OS X 10.6 Macbook Pro.
1) Download and Install the Mono Framework
Mono is basically an open source implementation of the .NET Framework. If you want to know more than that, checkout mono-project.com. For now, just know that you need this if you want to run an ASP application on your Mac, and you can download the latest version here. The dmg file has a package installer inside of it, and it should run just fine with the default configuration.
2) Download and Install the Mono CSDK
This is available from the same page, and is actually the link just to the RIGHT of the link for downloading the framework itself. I'd be lying if I said I knew what this was, but many people have said in the forums that it's necessary. :)
3) Download MonoDevelop and copy .app file to the Applications folder
MonoDevelop is a development environment for the .NET framework that you can run on a mac.
4) Forget everything about steps 1-3...
...when you realize that Mono isn't going to be much help running Classic ASP, which is not on the .NET framework.
5) find Apache::ASP
Sweet! Execute your classic ASP in Perl with http://www.apache-asp.org/
6) Make sure Apache is installed with mod_perl
If you're on a Mac, it's already there. Just add this to your httpd.conf:
LoadModule perl_module libexec/apache2/mod_perl.so
and add a perl.conf file to apache's "other" directory to allow the execution of perl scripts:
<ifmodule perl_module=""> AddHandler cgi-script .pl <ifmodule dir_module=""> DirectoryIndex index.pl index.html </ifmodule> </ifmodule>
7) download and install the latest Apache::ASP
tar file can be found here. I used 2.6.1.
First, edit your httpd.conf file again:
<directory $document_root="" asp="" eg=""> Options FollowSymLinks AllowOverride All </directory>
Then, in the root directory of the Apache::ASP download, run the following:
perl Makefile.PLWhich will tell you if you're missing any modules. I had to install MLDBM::Sync.
From there you can do your make process like any other:
make make test make install
8) test to make sure you can run an ASP script
With these steps in place, you should now at least be able to debug your inherited Classic ASP application on your Mac. Now, hurry up and rewrite it on a better platform!