I don't have that book on hand so I can't test the script in question (if it's short, perhaps you could post it). I can confirm that I have Apache+Mod_Perl+DBI+MySQL working on winXP. I downloaded BigApache which includes all of those elements compiled for winXP so the one install gets you all of them (and also Tomcat and PHP and other things unless you tell the installer you don't want them). If you are interested in BigApache, it will install new versions of apache, mod_perl, perl, and MySQL so if you have existing versions of those, you should probably remove them before install BigApache. | [reply] |
To work with Apache2 and mod_perl, you'll need a Perl 5.8, available from ActiveState, and a mod_perl 2.0 (or 1.99 something). Detailed instructions for all this is available here.
| [reply] |
Perl 5.6.1 is not binary compatible with Perl 5.8.x. If you are using any modules in your Perl scripts that you downloaded, say, within the last couple of years, and that module is not "pure Perl" you end up with compatibility problems.
Is there a reason you can't use Perl 5.8.0 or newer?
| [reply] |
Certainly, I have the same setup on my laptop where I test my webapps. I don't remember I did anything special, but I could be wrong, it's been awhile. It can be done, and works fine for me. | [reply] |
I have a strong suspicion that book uses mod_perl 1.x. You can get that version of mod_perl to work with perl 5.6.1, so there shouldn't be any huge problems collecting the parts that you need. You can find detailed instructions here.
If all else fails, and you still want mod_perl 1.x, try downloading Indigoperl 5.6.1. It is fully compatible with ActivePerl 5.6.1, apart for PPM which has been substituted by a web interface, and comes with Apache and mod_perl 1. | [reply] |
Actually, to follow the book you don't even need mod_perl. The scripts in the book are ordinary CGI scripts - mod_perl handlers are not used. mod_perl (via Apache::REgistry) is only recommended by DuBois for improved performance.
However, if you really wan't to use mod_perl, you can download one of the bundles other monks have suggested, or get one from apache.org - where you can get perl 5.6.1 + Apache 1.3.27 + mod_perl-1.27 OR Perl 5.8.4 + Apache 2.0.50 + mod_perl-1.99. Both distributions come with Apache::Session and DBI/DBD::mysql
| [reply] |