Problem starting Apache 1.3.14 with mod_perl 1.24_01

Problem starting Apache 1.3.14 with mod_perl 1.24_01

Post by James Kufrovi » Thu, 11 Jan 2001 13:33:59



Hi.

        I'm having a bit of difficulty getting a recent version of Apache
up and running mod_perl.  I'm trying to run apache 1.3.14 and mod_perl
1.24_01.  Everything finally compiled and installed ok, but when I start
httpd, I get the following error in my error_log:

Apache.pm version 1.26 required!
/usr/local/lib/perl5/site_perl/5.6.0/i586-linux/Apache.pm is version 1.27
Perhaps you forgot to 'make install' or need to uninstall an old version?
Found: /usr/local/lib/perl5/site_perl/5.6.0/i586-linux/Apache.pm

        This is after upgrading from apache 1.3.6-7 (an rpm), and I forget
the version of the previous mod_perl (dunno if it was an rpm or a
tarball). I did upgrade these in a rather haphazard way - I just wanted to
upgrade from perl 5.005_03 to 5.6, which I did without any problems, then
realized I'd have to (or just want to) upgrade mod_perl, then realized it
about apache, as well.  The route I took was something like this:

        upgrade perl (a 5.6 rpm)
        reinstall perl modules
        upgrade mod_perl from rpm
        trash the mod_perl rpm and install from a tarball instead
        upgrade apache from a tarball, after getting sick of rpms'
                dependencies
        install perl 5.6 again, this time from a tarball
        re-install my perl modules
        reinstall apache 1.3.14
        reinstall mod_perl 1.24_01
        find the "conflicting version" error from above
        uninstall the old apache 1.3.67 rpm, which I had forgotten to do
                previously. whoops
        reinstall apache 1.3.14 and mod_perl 1.24_01 from tarballs
        still get that error message

        And that's about where I am now, trying to figure out *why* I'm
getting that error message.  The Apache.pm file in my perl modules
library, which I think was installed from the mod_perl tarball, *is* 1.27.
*shrug*  Why would it complain about needing 1.26 if 1.27 is installed?
The odd part is this snippet of code from the mod_perl.c file in the
mod_perl source tree, starting around line 525:

-----------------------------------------
#define MP_APACHE_VERSION "1.27"

void mp_check_version(void)
{
    I32 i;
    SV *namesv;
    SV *version;
    STRLEN n_a;

    require_Apache(NULL);

    if(!(version = perl_get_sv("Apache::VERSION", FALSE)))
        croak("Apache.pm failed to load!"); /*should never happen*/
    if(strEQ(SvPV(version,n_a), MP_APACHE_VERSION)) /*no worries*/
        return;

    fprintf(stderr, "Apache.pm version %s required!\n",
            MP_APACHE_VERSION);
    fprintf(stderr, "%s", form("%_ is version %_\n",
                               *hv_fetch(GvHV(incgv), "Apache.pm", 9,
FALSE),
                               version));
    fprintf(stderr,
            "Perhaps you forgot to 'make install' or need to uninstall an
old version?\n");

-------------------------------------------

        Now, it's been a looong time since I've programmed in C (one class
in college way back when), but it seems like that "if(strEQ..." condition
should match, but I guess it doesn't for some reason.

        Anyway, if anybody knows how I can get this beast working, I'd
appreciate any hints or advice, either posted or emailed.  Thanks in
advance.

Jamie Kufrovich

--

FMSp3a/MS3a A- C D H+ M+ P+++ R+ T W Z+
Sp++/p# RLCT a+ cl++ d? e++ f h* i+ j p+ sm+

 
 
 

Problem starting Apache 1.3.14 with mod_perl 1.24_01

Post by Tulan W. H » Thu, 11 Jan 2001 21:34:07


Are you sure that you are running the newly built httpd?


Quote:> Apache.pm version 1.26 required!


 
 
 

Problem starting Apache 1.3.14 with mod_perl 1.24_01

Post by James Kufrovi » Fri, 12 Jan 2001 01:11:25



>Are you sure that you are running the newly built httpd?


>> Apache.pm version 1.26 required!

        Yes.  The only files named "httpd" on my machine are the
following:

465163 1407 -rwxrwxr-x   1 root     root      1440694 Jan  8 21:36
/usr/local/src/apache_1.3.14/src/httpd
223436  455 -rwxr-xr-x   1 root     root       465585 Jan  8 21:27
/usr/local/apache/bin/httpd

        And I call the latter file explicitly using the full pathname.
This results in the error mentioned in my previous post.  Odd that the
"source" httpd is newer than the installed binary, though...

Jamie Kufrovich

--

FMSp3a/MS3a A- C D H+ M+ P+++ R+ T W Z+
Sp++/p# RLCT a+ cl++ d? e++ f h* i+ j p+ sm+

 
 
 

Problem starting Apache 1.3.14 with mod_perl 1.24_01

Post by Tulan W. H » Fri, 12 Jan 2001 02:43:20


The size of the httpd has big different.
Maybe you should try the first one.
I'm having a problem when I want to test my new httpd before
the install takes place. I got the version problem.


Quote:> 465163 1407 -rwxrwxr-x   1 root     root      1440694 Jan  8 21:36
> /usr/local/src/apache_1.3.14/src/httpd
> 223436  455 -rwxr-xr-x   1 root     root       465585 Jan  8 21:27
> /usr/local/apache/bin/httpd

 
 
 

Problem starting Apache 1.3.14 with mod_perl 1.24_01

Post by James Kufrovi » Fri, 12 Jan 2001 10:36:02



Quote:>The size of the httpd has big different.
>Maybe you should try the first one.
>I'm having a problem when I want to test my new httpd before
>the install takes place. I got the version problem.

        Well, I just tried running /usr/local/src/apache_1.3.14/src/httpd,
and it complained about "LoadModule" in httpd.conf being an invalid
command. Hmmm, I think that since that file is in the src directory, that
it's not meant to be run, but installed elsewhere somehow.  That's just a
hunch, though, since I know almost nothing about software development and
the like.

Jamie Kufrovich

--

FMSp3a/MS3a A- C D H+ M+ P+++ R+ T W Z+
Sp++/p# RLCT a+ cl++ d? e++ f h* i+ j p+ sm+

 
 
 

Problem starting Apache 1.3.14 with mod_perl 1.24_01

Post by Tulan W. H » Sat, 13 Jan 2001 03:05:04


It sounds like that you built the httpd with the DSO feature and the mod_so
is not
in the core httpd. I had this problem before and I use
"--enable-rule=SHARED_CORE"
to avoid this problem.
It is nothing to do with the location of httpd.

> Well, I just tried running /usr/local/src/apache_1.3.14/src/httpd,
> and it complained about "LoadModule" in httpd.conf being an invalid
> command. Hmmm, I think that since that file is in the src directory, that
> it's not meant to be run, but installed elsewhere somehow.  That's just a
> hunch, though, since I know almost nothing about software development and
> the like.

 
 
 

Problem starting Apache 1.3.14 with mod_perl 1.24_01

Post by James Kufrovi » Mon, 15 Jan 2001 12:41:08




Quote:>    Well, I just tried running /usr/local/src/apache_1.3.14/src/httpd,
>and it complained about "LoadModule" in httpd.conf being an invalid
>command. Hmmm, I think that since that file is in the src directory, that
>it's not meant to be run, but installed elsewhere somehow.  That's just a
>hunch, though, since I know almost nothing about software development and
>the like.

        Well, I'd reply to Tulan W. Hu's response to this post, but it
appears to have disappeared from my newsserver.  I tried compiling apache
again, this time with --enable-shared=max, --enable-module=so, and
--enable-rule==SHARED_CORE, then mod_perl with the following options:

EVERYTHING=1
PERL_TRACE=1
APACHE_HEADER_INSTALL=1
DYNAMIC=1

### Use these?

#NO_HTTPD=1
#APACHE_SRC=/usr/local/src/apache_1.3.14

and it still didn't work. It looked like it was going to, but it turns out
that the mod_perl install didn't put a libperl.so anywhere in apache's
libexec directory.  Now that I think of it, I don't think it did that the
first time I tried installing it, either, so maybe the problem is with
mod_perl, and not apache?

        Aaaanyway, to summarize my situation, I'm not really a developer,
or a computer guru; I'm just a lowly Perl hacker wannabe who wants to Get
Things Done in Perl, and having a working webserver with mod_perl would
help me, what with CGI.pm and all.  I did look through the mod_perl guide,
version 1.28, and honestly, I was boggled only partway through it.  "If
you want to do this, enable A, B and C.  If you want to do that, enable B,
C, and D.  Otherwise, enable D, E and F."  That's what it seems like to
me.  (And every other doc I've read on this makes just about as much sense
to me.)  Do I want to use DO_HTTPD, or ALL_HOOKS, or EVERYTHING, or any
other options?  I honestly have no idea.  Actually, the RPMs I was using
before I upgraded to Perl 5.6.0 (the apache RPM that came with my RedHat
6.0 distro, and some mod_perl I downloaded) worked just fine for my needs.
If it weren't for the fact that installing current RPMs would require me
to upgrade about twenty different RPMs, and that I don't know which
version of Perl a particular mod_perl RPM was built against, I'd use the
RPMs.  I thought that compiling from the tarballs would be easier, but I
was apparently wrong.  Can someone give me step-by-step instructions to
get a working apache/mod_perl setup, including which to compile first?  Or
if someone knows of a mod_perl RPM that was built against Perl 5.6.0, I
*might* go that route instead.  I would really appreciate any help with
this.  Thanks in advance.

Jamie Kufrovich

--

FMSp3a/MS3a A- C D H+ M+ P+++ R+ T W Z+
Sp++/p# RLCT a+ cl++ d? e++ f h* i+ j p+ sm+

 
 
 

1. mod_perl 1.24 problems with apache 1.3.14

While trying to configure mod_perl 1.24 with apache 1.3.14, the makefile
didn't seem to be able to determine the version number for apache:

# perl Makefile.PL APACHE_SRC=../apache_1.3.14/src \
Will configure via APACI
Configure mod_perl with /usr/local/stronghold/src ? [y]
../apache_1.3.14/src
Configure mod_perl with ../apache_1.3.12/src ? [y] ../apache_1.3.14/src
************* WARNING *************

  Apache Version 1.3.0 required, aborting...

************* WARNING *************

After a bit of digging through the Makefile.PL that comes with mod_perl, I
discovered that it was searching through the httpd.h file that comes with
apache to determine the version number of apache that you are trying to
install mod_perl into.  Due to what I suspect are recent changes in the
apache source, mod_perl's parser doesn't seem to be able to determine the
version number of apache 1.3.14.  

As a workaround, I made this change to my src/include/httpd.h in the
apache 1.3.14 source tree:

--- httpd.h.orig        Fri Oct 13 12:09:12 2000

 #define SERVER_BASEVENDOR   "Apache Group"
 #define SERVER_BASEPRODUCT  "Apache"
 #define SERVER_BASEREVISION "1.3.14"
-#define SERVER_BASEVERSION  SERVER_BASEPRODUCT "/" SERVER_BASEREVISION
+/* mod_perl doesn't seem to be able to cope with the following */
+/* #define SERVER_BASEVERSION  SERVER_BASEPRODUCT "/" SERVER_BASEREVISION
*/
+#define SERVER_BASEVERSION "Apache/1.3.14"

 #define SERVER_PRODUCT  SERVER_BASEPRODUCT
 #define SERVER_REVISION SERVER_BASEREVISION

This modification seems to have allowed the configuration of mod_perl to
succeed.  I thought that this might help out someone else, in case they
ran into the same problem.  

A better solution would probably be for mod_perl to modify its Makefile.PL
to deal with the current apache header files.

chris

2. HELP! Printing dvi/ps Files

3. Help installing mod_perl on Apache 1.3.14

4. possible to generate htpasswd file on win95?

5. apache 1.3.14, mod_perl-1.24_01, solaris 2.7: seg faults

6. ftp not working

7. proplems with Apache 1.3.14/PHP 4/mod_perl

8. How to tell XF86 to use a higher clock for G200 SD?

9. Apache 1.3.14 Start Warning

10. apache 1.3.14 won't start

11. Apache 1.3.14 / Netware Perl/CGI PROBLEM, Please help!

12. PDF problems with Apache 1.3.14

13. apache 1.3.14 - rewrite problem?