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/07 14:40:21 UTC
Problem installing Mod_perl_1.99 with apache_2.0.39
Actually, I have two questions, but the second is very secondary, an
unrelated to the first.
All work is on a RedHat Linux box, as a non-root user.
Perl is 5.6.1, and I already have two copies of apache 2 installed.
I am now trying to set up a mod-perl enabled server. (oh, and yes.. I
*do* do a 'make clean' before I configure :)
I have installed a new server using the following configure command
(line-wrapped by the mail-client):
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 works fine, and I have no problems here: I can start'n'stop the
server, and see known-correct pages in my browser.
I then prepare mod_perl (version 1.99, 'cos I'm using apache 2) with the
following line:
perl Makefile.PL MP_INST_APACHE2=1 MP_DEBUG=1 MP_INST_APACHE2=1
MP_AP_PREFIX=/home/cpan/httpd-2.0.39 MP_USE_STATIC=1 MP_USE_DSO=0
This appears to configure OK, and the 'make' completes with no errors.
I know that I can't simply run 'make test' due to (a) a non-standard
location & (b) a non-standard name, so I have tried the line:
t/TEST -httpd /home/cpan/sbin/httpd2_mod_perl
This fails, unable to find "Apache/Const.pm":
------- start screen dump ------------
[cpan@lucas mod_perl-1.99_07]$ t/TEST -httpd
/home/cpan/sbin/httpd2_mod_perl
*** setting ulimit to allow core files
ulimit -c unlimited; t/TEST -httpd '/home/cpan/sbin/httpd2_mod_perl'
Can't locate Apache/Const.pm in @INC (@INC contains: Apache-Test/lib
/home/cpan/mod_perl-1.99_07/Apache-Test/lib
/home/cpan/mod_perl-1.99_07/lib /home/cpan/mod_perl-1.99_07/blib/lib
/home/cpan/mod_perl-1.99_07/blib/arch
/home/cpan/mod_perl-1.99_07/t/../Apache-Test/lib
/home/cpan/mod_perl-1.99_07/t/../lib
/home/cpan/mod_perl-1.99_07/t/../../lib
/home/cpan/lib/perl5/5.6.1/i686-linux /home/cpan/lib/perl5/5.6.1
/home/cpan/lib/perl5/site_perl/5.6.1/i686-linux
/home/cpan/lib/perl5/site_perl/5.6.1 /home/cpan/lib/perl5/site_perl .)
at /home/cpan/mod_perl-1.99_07/t/response/TestApache/subprocess.pm line
12.
BEGIN failed--compilation aborted at
/home/cpan/mod_perl-1.99_07/t/response/TestApache/subprocess.pm line 12.
Compilation failed in require at
/home/cpan/mod_perl-1.99_07/t/../Apache-Test/lib/Apache/TestConfigPerl.pm line 382.
/home/cpan/sbin/httpd2_mod_perl -d /home/cpan/mod_perl-1.99_07/t -f
/home/cpan/mod_perl-1.99_07/t/conf/httpd.conf -DAPACHE2
using Apache/2.0.39 (prefork MPM)
waiting for server to start: .Syntax error on line 598 of
/home/cpan/mod_perl-1.99_07/t/conf/httpd.conf:
LoadModule takes two arguments, a module name and the name of a shared
object file to load it from
!!!
server has died with status 1 (t/logs/error_log wasn't created, start
the server in the debug mode)
[cpan@lucas mod_perl-1.99_07]$
------- end screen dump ------------
I have had a look for the file Const.pm in the user's directory tree,
and it does exist, however it's full path is:
/home/cpan/mod_perl-1.99_07/blib/lib/Apache2/Apache/Const.pm
(there is an extra /Apache2 in there)
How to I get the test program to use (build?) the correct @INC array?
Many thanks.
Oh, the second question.... sorry.
I want to include the MP_USE_GTOP option, however the make barfs, unable
to locate the glibtop header files (even though I have set the
environment variable LD_LIBRARY_PATH to refer to the correct directory.
Any thoughts here?
(As I said, not really as important :-)
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/
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/
[mp 2] Redefining the problem (was Re: Problem installing
Mod_perl_1.99 with apache_2.0.39)
Posted by Ian Stuart <Ia...@ed.ac.uk>.
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: Problem installing Mod_perl_1.99 with apache_2.0.39
Posted by Ian Stuart <Ia...@ed.ac.uk>.
One issue solved.
After re-re-rereading the various docs, it dawned on me that that
MP_AP_PREFIX refers to the directory that the working apache 2 tree is
in, not the source tree (as v1 did).
I'm still not able to get Apache to recognise the existence of Mod-Perl
though....
On Mon, 2002-10-07 at 13:40, Ian Stuart wrote:
> I then prepare mod_perl (version 1.99, 'cos I'm using apache 2) with the
> following line:
>
> perl Makefile.PL MP_INST_APACHE2=1 MP_DEBUG=1 MP_INST_APACHE2=1
> MP_AP_PREFIX=/home/cpan/httpd-2.0.39 MP_USE_STATIC=1 MP_USE_DSO=0
--
--==++
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: identifying a unique browser session
Posted by Perrin Harkins <pe...@elem.com>.
Martin Moss wrote:
> How would I go about identifying if a user logs in from 2 different
> browsers?
Can you be more specific? Do you mean two browser windows, or two
different browser programs on the same machine, or two different machines?
> I Have a Session object, but I want to hold data within that session object
> that identifies which browser a user is using. So I can confirm that a user
> who provides a session key in their cookie, is checked and that that session
> key matches that browser.
If you issue each user a unique cookie, then each separate browser will
have a separate identifying ID. I can't tell what the problem is from
your description. Maybe you're looking for something like
Apache::AuthTicket?
- Perrin
identifying a unique browser session
Posted by Martin Moss <Ma...@btinternet.com>.
All,
How would I go about identifying if a user logs in from 2 different
browsers?
I Have a Session object, but I want to hold data within that session object
that identifies which browser a user is using. So I can confirm that a user
who provides a session key in their cookie, is checked and that that session
key matches that browser.
The issue is, that an ip address isn't always unique:-(
Any ideas,
Marty