You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ian Stuart <Ia...@ed.ac.uk> on 2002/10/09 12:20:51 UTC
[mp 2] Redefining the problem (was Re: Problem installing
Mod_perl_1.99 with apache_2.0.39)
Right, I now have a mod-perl enables apache server, however I consider
this a bodge-fix.
What I have:
Server Version: Apache/2.0.39 (Unix) mod_perl/1.99_07-dev Perl/v5.6.1
How I get here:
1) I build apache with:
TARGET=httpd2.mod_perl ./configure --build=i686
--enable-layout=Lucas.mod_perl --enable-mime-magic --enable-expires
--enable-info --enable-cgi --enable-include --enable-negotiation
--disable-userdir --with-program-name=httpd2_mod_perl --with-mpm=prefork
This is fine.
2) I build mod-perl with
perl Makefile.PL MP_DEBUG=1 MP_INST_APACHE2=1
MP_AP_PREFIX=/home/cpan/apache2.mod_perl
This creates a file:
[cpan@lucas apache2.mod_perl]$ ls -l m*
-rwxr-xr-x 1 cpan datalib 1650865 Oct 9 11:08 modules
Thus, I add the following to the end of my .conf file:
#
# Mod_Perl stuff
# ??BODGE??
LoadModule perl_module modules
Now, the mod-perl perl Makefile.pl script ends with:
---- quote ----
*** mod_perl dso library will be built as mod_perl.so
*** mod_perl static library will be built as mod_perl.a
*** You'll need to add the following to httpd.conf:
*** LoadModule perl_module modules/mod_perl.so
---- quote ----
So, why am I building a file called modules, and not a file called
mod_perl.so within a directory called modules?
Yours,
Confused of Edinburgh....
--
--==++
Ian Stuart: Edinburgh University Data Library.
Information is not knowledge
Knowledge is not wisdom
Wisdom is not truth
Truth is not beauty
Beauty is not love
Love is not music
-- Mary.
Personal web site: http://lucas.ucs.ed.ac.uk/
Re: [mp 2] Bug report - mod-perl install process.
Posted by Stas Bekman <st...@stason.org>.
Ian Stuart wrote:
> Server Version: Apache/2.0.39 (Unix) mod_perl/1.99_07-dev Perl/v5.6.1
>
> I believe that the install process does not test for the presence (or
> lack of..) of the <apache_server_root>/modules directory.
>
> This causes a problem during the mod_perl installation as the
> pseudo-command "cp $SOURCE/mod_perl.so $SERVER/modules" creates a large
> file called "modules", not a file called "mod_perl.so" within a
> directory called "modules"
[...]
Indeed, it doesn't. Thanks for the report.
Does the following patch solve the problem? I'm not quite sure how
portable it is, but neither ExtUtils::MakeMaker nor %Config provide
entries for test_d and mkdir.
Index: lib/Apache/Build.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
retrieving revision 1.107
diff -u -r1.107 Build.pm
--- lib/Apache/Build.pm 29 Aug 2002 02:00:56 -0000 1.107
+++ lib/Apache/Build.pm 11 Nov 2002 15:37:06 -0000
@@ -1057,6 +1057,7 @@
lib: $(MODPERL_LIB)
install:
+ test -d $(MODPERL_AP_LIBEXECDIR) || mkdir $(MODPERL_AP_LIBEXECDIR)
$(MODPERL_TEST_F) $(MODPERL_LIB_DSO) && \
$(MODPERL_CP) $(MODPERL_LIB_DSO) $(MODPERL_AP_LIBEXECDIR)
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
[mp 2] Bug report - mod-perl install process.
Posted by Ian Stuart <Ia...@ed.ac.uk>.
Server Version: Apache/2.0.39 (Unix) mod_perl/1.99_07-dev Perl/v5.6.1
I believe that the install process does not test for the presence (or
lack of..) of the <apache_server_root>/modules directory.
This causes a problem during the mod_perl installation as the
pseudo-command "cp $SOURCE/mod_perl.so $SERVER/modules" creates a large
file called "modules", not a file called "mod_perl.so" within a
directory called "modules"
To demonstrate the issue, I did the following:
1) create an apache with the configure options of:
TARGET=httpd2.mod_perl ./configure --build=i686
--enable-layout=Lucas.mod_perl --enable-mime-magic --enable-expires
--enable-info --enable-cgi --enable-include --enable-negotiation
--disable-userdir --with-program-name=httpd2_mod_perl --with-mpm=prefork
(config.layout contains:
<Layout Lucas.mod_perl>
prefix: /home/cpan/apache2.mod_perl
exec_prefix: /home/cpan
bindir: ${exec_prefix}/bin
sbindir: ${exec_prefix}/sbin
libdir: ${exec_prefix}/lib
libexecdir: ${exec_prefix}/libexec
mandir: ${prefix}/man
sysconfdir: ${prefix}/etc
datadir: ${prefix}/share
iconsdir: ${datadir}/icons
htdocsdir: ${datadir}/htodcs
manualdir: ${htdocsdir}/manual
cgidir: ${datadir}/cgi-bin
includedir: ${prefix}/include
localstatedir: ${prefix}/var
runtimedir: ${prefix}/var/run
logfiledir: ${localstatedir}/log
proxycachedir: ${localstatedir}/proxy
infodir: ${localstatedir}/info
installbuilddir: ${sysconfdir}/build
errordir: ${datadir}/error
</Layout>
)
Build and install Mod-Perl with:
perl Makefile.PL MP_DEBUG=1 MP_INST_APACHE2=1
MP_AP_PREFIX=/home/cpan/apache2.mod_perl
then make && make install.
This creates a large file called "modules" in the $SERVERROOT directory.
If I physically make the modules/ directory after step 1, then the
mod_perl.so file is copied across correctly.
I've also tested this with httpd 2.0.43, and it does the same think --
no .../modules directory is created.
Ta..
--
--==++
Ian Stuart: Edinburgh University Data Library.
Information is not knowledge
Knowledge is not wisdom
Wisdom is not truth
Truth is not beauty
Beauty is not love
Love is not music
-- Mary.
Personal web site: http://lucas.ucs.ed.ac.uk/