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

I've just installed the Zangweb Apache-2 / mysql suite of programs on my PC (Windows-XP v5.1). After I used CPAN to install the Apache modules, I tried to install the mod_perl2 module. After specifying the full path to the provided apxs, the following errors were produced:
[ error] Unable to determine server version, aborting [ error] Invalid MP_APXS specified
The follow-up messages said, essentially, that the installation had failed.

I've googled the errors, and have seen the same question posted on Fink and Ubuntu newsgroups. Opinions were offered (that other header files needed to be extracted from the repository), but I haven't found a solution on any of these other sites.

Has anyone here encountered this problem, and can you share with me what I need to do to resolve the matter?

Many thanks in advance.

Replies are listed 'Best First'.
Re: Problem installing CPAN mod_perl
by almut (Canon) on Oct 23, 2008 at 20:46 UTC

    The code which tries to determine the Apache server version is in the method Apache2::Build::httpd_version(). Apparently, it looks in a file ap_release.h, so the first step would be to make sure you have that file installed (together with the other Apache header files), and have the respective directory specified as an "include" directory.  (In case you already do have the file, you might want to insert a couple of debugging prints into that routine, to figure out what's going wrong...)

    I've never heard of Zangweb Apache, so I can't help with where to find the appropriate header files... But in any case, make sure the ones you eventually dig up do in fact match the Apache server you have installed.

    Other than that I'm afraid I can only wish you good luck :)

      If you are working with Apache on a PC under Windows, may I ask where you downloaded it? I went to the site referenced in Practical mod_perl, which pointed to three sites. It was not immediately obvious from the first two how to download Apache, MySql, etc, while it was fairly straightforward from Zangweb.

      Thank you for your time. I no longer have access to a Unix box, and am trying to master this (for me) new skill set.

      Revised: Thanks, almut, for reminding me that the hardware is not the OS...

        I'm sorry I can't give any Windows specific advice (I'm assuming PC == Windows box). Personally, I've only ever worked with Apache/mod_perl in the Unix/Linux environment.  But I suppose there are other, more Windows-savvy monks around, who will be able to help here...

Re: Problem installing CPAN mod_perl
by CountZero (Bishop) on Oct 23, 2008 at 21:16 UTC
    What Perl are you using? If it is Activestate's you can use ppm to install mod_perl2. Randy Kobes' has them here.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: Problem installing CPAN mod_perl
by Anonymous Monk on Oct 24, 2008 at 09:44 UTC
    Why not contact Zangweb for support? http://www.arbingersys.com/hostsites/zangweb/ says it comes with apache2 and mod_perl2, so what are you doing?
    Here is what you get with zangweb:
    • Apache version 2.2.3
    • MySQL version 5.0.24-community-log for Win32 on ia32
    • Perl version 5.8.8 built for MSWin32-x86-multi-thread
        Featured modules
      • CGI 3.15 - Web programming library
      • CGI::Ajax 0.697 - Perl-specific system for writing Asynchronous web applications
      • DBI 1.52 - Database connectivity (MySQL)
      • HTML::Parser 3.55 - Parse and extract info from HTML
      • DBD::ADO 2.95 - Use Microsoft ADO to connect to data
      • DBD::ODBC 1.13 - Use ODBC data sources
      • LWP 5.805 - Develop web clients
      • Net::FTP 2.75 - FTP client library
      • Net::POP3 2.28 - POP3 client library
      • Net::SMTP 2.29 - Send SMTP email
      • SOAP::Lite 0.69 - Lightweight interface to the Simple Object Access Protocol
      • Template 2.09 - The Template Toolkit
      • XML::Parser 2.34 - Parse XML documents
    • OpenSSL/mod_ssl - Secure your site with SSL
    • mod_perl version 2.0
    As you can see, a thoroughly modern and feature-rich web development system!