Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Misery: trying to get mod_perl working on Windows 2008

by stuckey (Novice)
on Aug 03, 2012 at 14:01 UTC ( [id://985243]=perlquestion: print w/replies, xml ) Need Help??

stuckey has asked for the wisdom of the Perl Monks concerning the following question:

Folks, I'm adrift in a sea of pain. Been locked for the last several days in an epic struggle to migrate a Linux-based mod_perl app to Windows 2008. After days of wrestling with Strawberry, I finally broke down and went to ActiveState (had hoped to avoid the $999 license fee, but alas). Anyway, it appears ActiveState no longer supports mod_perl. Attempts to ppm imstall fail with:
ppm install failed: The PPD does not provide code to install for this platform
After toiling awhile in ignorance, I found this on ActiveState's site (http://code.activestate.com/ppm/mod_perl/):
mod_perl is unavailable in PPM, because there aren't any builds for it in the package repositories.
Fell back to CPAN, but when attempting to install mod_perl2, it fails when setting up the gcc environment, says:
Please repair your Module::CoreList at lib/Apache2/Build.pm line 49.
Tried XAMPP -- but problems here, too -- and XAMMP itself says it's for development only -- not appropriate for production servers. Tried AMPP and IndigoPerl -- ran into problems with all. So, again, a sea of pain -- no sail -- no oars -- rudderless. I'm hopeless when it comes to Windows. Am I tilting at windmills here? Is mod_perl even viable in the Windows environment? Can anyone suggest a reliable way to get mod_perl working in Windows 2008?

EDIT: Some success to report: I uninstalled ActivePerl 5.14 and replaced it with version 5.12. Afterwards, I was able to install a mod_perl package via ppm: C:> ppm install http://cpan.uwinnipeg.ca/PPMPackages/12xx/mod_perl.ppd Unfortunately, the app in question uses XML::Compile, and the older version available for this installation breaks my code. Suggestions still welcome. Thanks!

Replies are listed 'Best First'.
Re: Misery: trying to get mod_perl working on Windows 2008
by greengaroo (Hermit) on Aug 03, 2012 at 14:28 UTC

    Just to make sure we understand every aspects of your setup, are you using Apache web server? For Windows? Latest version?

    -- Take my advice. I don't use it anyway.
    -- [id://USERID]
      Yes -- Apache 2.2 32-bit for Windows
Re: Misery: trying to get mod_perl working on Windows 2008
by Anonymous Monk on Aug 03, 2012 at 16:22 UTC

    I know this is probably not helpful in your case, but you should not use mod_perl unless your scripts actually need the Apache integration (that is, you want to modify requests, not just serve pages). Of course, you can use it for plain CGI-ish serving but it is rather heavy-weight for that.

    BTW, have you tried XAMPP? It claims to include mod_perl, and a 5.16 strawberry, too. Alas, no Win2k8 support that I can see.

      Why are you recommending NOT to run mod_perl? Just would like the thought on this...
        Why are you recommending NOT to run mod_perl?

        Well, there are some reasons not to use mod_perl. The main reason is that there is only one Perl interpreter instance (actually, there is one per worker process, cloned around forking the worker process). It runs inside the Apache process. Forking and cloning may cause some minor trouble, but that's rarely a problem. Mostly, this affects DBI, and Apache::DBI knows enough of DBIs internals to handle most of the problem. On Windows, Apache does not fork (as far as I know), but creates threads instead. So, everything runs in a single process.

        The real problems are:

        • all applications have to share the one interpreter (per process)
        • all applications run in the process context of the Apache process
        • a single application error kills the entire Apache process
        • a single application error happening before Apache forks its worker processes kills the entire webserver

        So, applications are de facto not isolated from each another, and you can not use operating system permissions to limit access to only one application or to the web server.

        Compare with FastCGI:

        • The FastCGI process uses a single Perl interpreter for each application.
        • Each application runs inside its own process context, so you can isolate the applications using different users, filesystem permissions, chroot jails, and so on.
        • FastCGI communication uses sockets, either local ("Unix") sockets or TCP sockets. So you can run applications on different machines, perhaps behind firewalls that further isolate the web server.
        • FastCGI is available not only for Apache, but also for Nginx, IIS, Roxen, Lighttpd, and several other servers. So you don't have to re-invent the wheel just because you switch to a different webserver.

        Of course, because FastCGI runs outside the Apache server, you have some communication overhead. And you can't use all of the Apache internals that mod_perl offers but rarely anyone uses.

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re: Misery: trying to get mod_perl working on Windows 2008
by Anonymous Monk on Aug 03, 2012 at 18:21 UTC

    Anyway, it appears ActiveState no longer supports mod_perl...

    If you boght a license, contact support

      I downloaded the free version for proof of concept. If it gets working, though, it'll be for a commercial app, so business license will be required.
Re: Misery: trying to get mod_perl working on Windows 2008
by TRoderic (Novice) on Oct 10, 2012 at 14:30 UTC

    First, apologies for the bump, but this is near the top of mod_perl on google atm, and I actually know how to do this.

    You need to get strawberry perl 5.10 OR 5.12. I have not been able to find the mod_perl.so files compatible with 5.14+, but that's another issue.

    next; follow the instructions *to the letter* in this thread which details how to mod_perl strawberry, including links to the relevant repositories in the strawberry namespace. The testweb directory has an example http conf which I testify works if you adjust properly.

    I've deployed this exact setup on both xampp and plain apache in win 2008, r2 and plain Windows 7. It's possible but very easy to make a mistake.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://985243]
Approved by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-03-19 07:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found