Re: httpd chroot 3.2 mod_perl

2003-02-08 Thread David Nicely
[EMAIL PROTECTED] wrote:


 Hi,
   I have the following error while running mod_perl chrooted
which I would appreciate suggestions.
[Sat Feb  8 08:58:30 2003] [error] Can't locate Apache/Test.pm in @INC (@INC contains: /var/www/lib/perl
+/var/www/lib/perl/Apache [...] . /var/www/) at (eval 299) line 3 during global destruction.


I think that becouse of the chroot, /var/www/lib/perl is not a valid 
path for @INC .
this would make mod_perl look in actual path /var/www/var/www/lib/perl

 

[Sat Feb  8 08:58:30 2003] [error] Undefined subroutine &Apache::Test::handler called at PerlHandler subroutine
+`Apache::Test' line 1 during global destruction.

ls -la /var/www/lib/perl/Apache
total 10
drwxr-xr-x  2 root  daemon   512 Feb  8 09:05 .
drwxr-xr-x  3 root  daemon   512 Feb  8 09:05 ..
-r--r--r--  1 root  daemon  7822 Feb  8 08:44 Test.pm

@INC looks fine..
   

## httpd.conf changes to test mod_perl chroot
# LoadModule foo_module libexec/mod_foo.so
LoadModule perl_modulelib/modules/mod_perl.so
#LoadModule perl_module/usr/lib/apache/modules/mod_perl.so
PerlRequire conf/startup.pl
PerlFreshRestart On
PerlModule Apache
[...]

 SetHandler perl-script
# Options and allow from all will adjust later
 Options ExecCGI
 allow from all
 PerlHandler Apache::Test

[...]
EOF

# ok check to make certain chroot has mod_perl dso where it likes it
ls -la /var/www/lib/modules
total 234
drwxr-xr-x  2 root  daemon 512 Feb  7 17:53 .
drwxr-xr-x  4 root  daemon 512 Feb  7 17:52 ..
-rwxr-xr-x  1 root  daemon  227540 Feb  7 17:53 mod_perl.so

# ok make sure conf/startup.pl exists
ls -al /var/www/conf
total 142
drwxr-xr-x   2 root  daemon512 Feb  7 16:41 .
drwxr-xr-x  12 root  daemon512 Feb  8 07:16 ..
-r--r--r--   1 root  bin 34840 Feb  8 09:08 httpd.conf
-r--r--r--   1 root  bin 44119 Oct  3 19:33 httpd.conf-dist
-r--r--r--   1 root  bin 34530 Feb  6 16:39 httpd.conf.bak
-r--r--r--   1 root  bin 12965 Oct  3 19:33 magic
-r--r--r--   1 root  bin 12381 Oct  3 19:33 mime.types
-rw-r--r--   1 root  bin   399 Feb  8 08:39 startup.pl
 
#used PerlModule Apache to tell httpd to load on startup we always start Fresh with apachectl start
less startup.pl
#!/usr/bin/perl
  
#modify the include path before we do anything
BEGIN {

 # forced insert into @INC to see if this is the problem. nope .. still does not work..
 use lib "/var/www/lib/perl/Apache";
 use Apache ();
 use lib Apache->server_root_relative('lib/perl');

}

#commonly used modules
use Apache::Registry ();
use Apache::Constants ();
use CGI qw(-compile :all);
use CGI::Carp ();

1;

#Well seems like there is something missing. Not sure what. Suggestions?


Best Regards,
[EMAIL PROTECTED]


 







Re: httpd chroot 3.2 mod_perl

2003-02-08 Thread Stas Bekman
[EMAIL PROTECTED] wrote:

  Hi,
I have the following error while running mod_perl chrooted
which I would appreciate suggestions.
[Sat Feb  8 08:58:30 2003] [error] Can't locate Apache/Test.pm in @INC (@INC contains: /var/www/lib/perl
+/var/www/lib/perl/Apache [...] . /var/www/) at (eval 299) line 3 during global destruction.

[Sat Feb  8 08:58:30 2003] [error] Undefined subroutine &Apache::Test::handler called at PerlHandler subroutine
+`Apache::Test' line 1 during global destruction.

ls -la /var/www/lib/perl/Apache
total 10
drwxr-xr-x  2 root  daemon   512 Feb  8 09:05 .
drwxr-xr-x  3 root  daemon   512 Feb  8 09:05 ..
-r--r--r--  1 root  daemon  7822 Feb  8 08:44 Test.pm


Because there is Apache::Test from the test suite (which doesn't have a 
function called 'handler') installed under @INC, and it probably happens to 
get loaded before your Apache::Test. Rename your package and it'll probably 
just work.

[p.s. it's a good practice not to hit reply on another thread's message, but 
to start a new mail when you start a new thread, otherwise you mess up the 
previous thread and the current one.]

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



httpd chroot 3.2 mod_perl

2003-02-08 Thread [EMAIL PROTECTED]
  Hi,
I have the following error while running mod_perl chrooted
which I would appreciate suggestions.
[Sat Feb  8 08:58:30 2003] [error] Can't locate Apache/Test.pm in @INC (@INC contains: 
/var/www/lib/perl
+/var/www/lib/perl/Apache [...] . /var/www/) at (eval 299) line 3 during global 
+destruction.

[Sat Feb  8 08:58:30 2003] [error] Undefined subroutine &Apache::Test::handler called 
at PerlHandler subroutine
+`Apache::Test' line 1 during global destruction.

ls -la /var/www/lib/perl/Apache
total 10
drwxr-xr-x  2 root  daemon   512 Feb  8 09:05 .
drwxr-xr-x  3 root  daemon   512 Feb  8 09:05 ..
-r--r--r--  1 root  daemon  7822 Feb  8 08:44 Test.pm

@INC looks fine..


## httpd.conf changes to test mod_perl chroot
# LoadModule foo_module libexec/mod_foo.so
LoadModule perl_modulelib/modules/mod_perl.so
#LoadModule perl_module/usr/lib/apache/modules/mod_perl.so
PerlRequire conf/startup.pl
PerlFreshRestart On
PerlModule Apache
[...]

  SetHandler perl-script
# Options and allow from all will adjust later
  Options ExecCGI
  allow from all
  PerlHandler Apache::Test

[...]
EOF

# ok check to make certain chroot has mod_perl dso where it likes it
ls -la /var/www/lib/modules
total 234
drwxr-xr-x  2 root  daemon 512 Feb  7 17:53 .
drwxr-xr-x  4 root  daemon 512 Feb  7 17:52 ..
-rwxr-xr-x  1 root  daemon  227540 Feb  7 17:53 mod_perl.so

# ok make sure conf/startup.pl exists
ls -al /var/www/conf
total 142
drwxr-xr-x   2 root  daemon512 Feb  7 16:41 .
drwxr-xr-x  12 root  daemon512 Feb  8 07:16 ..
-r--r--r--   1 root  bin 34840 Feb  8 09:08 httpd.conf
-r--r--r--   1 root  bin 44119 Oct  3 19:33 httpd.conf-dist
-r--r--r--   1 root  bin 34530 Feb  6 16:39 httpd.conf.bak
-r--r--r--   1 root  bin 12965 Oct  3 19:33 magic
-r--r--r--   1 root  bin 12381 Oct  3 19:33 mime.types
-rw-r--r--   1 root  bin   399 Feb  8 08:39 startup.pl
  
#used PerlModule Apache to tell httpd to load on startup we always start Fresh with 
apachectl start
less startup.pl
#!/usr/bin/perl
   
#modify the include path before we do anything
BEGIN {

  # forced insert into @INC to see if this is the problem. nope .. still does not 
work..
  use lib "/var/www/lib/perl/Apache";
  use Apache ();
  use lib Apache->server_root_relative('lib/perl');

}

#commonly used modules
use Apache::Registry ();
use Apache::Constants ();
use CGI qw(-compile :all);
use CGI::Carp ();

1;

#Well seems like there is something missing. Not sure what. Suggestions?
 

Best Regards,
[EMAIL PROTECTED]



Re: test failed; ... t/httpd.conf

2003-02-08 Thread Stas Bekman
Vicki Brown wrote:

At 14:05 +1100 2003-02-09, Stas Bekman wrote:


what happens if you do:

cd ../apache_1.3.27/src
make



At this point, I get a "probably harmless" note and a make error.

I ran:
 configure \
--server-uid=www \
--server-gid=www \
--with-perl=/usr/bin/perl \
--with-layout=Apache \
--enable-module=most \
--enable-shared=max \
--enable-module=auth_db \
--enable-module=mmap_static \
--activate-module=src/modules/perl/libperl.a \
--disable-module=auth_dbm \
--disable-rule=EXPAT


I may have things wrong with the shared libraries. My instructions for the
package I ultimately want to run (Bricolage) tell me to build mod_perl in
statically, not as a DSO. So I removed "--enable-shared=perl"

The configure worked except I got a complaint:
Note (probably harmless): No library found for -lbind

Suggestions for solving this would be appreciated. In my experience, things
that are 'probably" harmless often bite anyway.


You don't have libbind installed (neither do I), I see that src/Configure has:

*-BeOS*)
PLATOSVER=`uname -r`
case "$PLATOSVER" in
5.0.4*)
OS="BeOS BONE"
LIBS="-lbind -lsocket -lbe -lroot"
CFLAGS="$CFLAGS -DBONE"
;;
*)

and you seem to be on FreeBSD, no BeOS.


The make then ran to here:

   gcc -c -I../.. -I/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE
   -I../../os/unix -I../../include   -funsigned-char -DMOD_PERL
   -DUSE_PERL_SSI -fno-strict-aliasing -I/usr/local/include
   `../../apaci` -fpic -DSHARED_MODULE mod_auth_db.c && mv mod_auth_db.o
   mod_auth_db.lo

   mod_auth_db.c: In function `get_db_pw':
   mod_auth_db.c:175: warning: passing arg 2 of pointer to function from
 incompatible pointer type
   mod_auth_db.c:175: warning: passing arg 4 of pointer to function makes
 pointer from integer without a cast
   mod_auth_db.c:175: too few arguments to function
   *** Error code 1

   Stop in /ad4/ENV/common/src/WWW/apache_1.3.27/src/modules/standard.


can you normally build Apache (without mod_perl) when --enable-module=auth_db 
is in?

Sigh.

This was following the mod_perl instructions in the _Apache_ INSTALL file,
which say to
   configure mod_perl
   make
   make install
   ...
   configure Apache


of course, you have just overwritten the mod_perl install.


   make
   make install

Said instructions leave out the test steps entirely, which doesn't give me
warm fuzzies anywhere...


when you complete building mod_perl (static) enabled httpd, you should be able 
to see it:

% apache_1.3.27/src/httpd -l | grep mod_perl
  mod_perl.c


__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Re: test failed; ... t/httpd.conf

2003-02-08 Thread Vicki Brown
At 14:05 +1100 2003-02-09, Stas Bekman wrote:
>what happens if you do:
>
>cd ../apache_1.3.27/src
>make

At this point, I get a "probably harmless" note and a make error.

I ran:
 configure \
--server-uid=www \
--server-gid=www \
--with-perl=/usr/bin/perl \
--with-layout=Apache \
--enable-module=most \
--enable-shared=max \
--enable-module=auth_db \
--enable-module=mmap_static \
--activate-module=src/modules/perl/libperl.a \
--disable-module=auth_dbm \
--disable-rule=EXPAT


I may have things wrong with the shared libraries. My instructions for the
package I ultimately want to run (Bricolage) tell me to build mod_perl in
statically, not as a DSO. So I removed "--enable-shared=perl"

The configure worked except I got a complaint:
Note (probably harmless): No library found for -lbind

Suggestions for solving this would be appreciated. In my experience, things
that are 'probably" harmless often bite anyway.


The make then ran to here:

   gcc -c -I../.. -I/usr/local/lib/perl5/5.6.1/i386-freebsd/CORE
   -I../../os/unix -I../../include   -funsigned-char -DMOD_PERL
   -DUSE_PERL_SSI -fno-strict-aliasing -I/usr/local/include
   `../../apaci` -fpic -DSHARED_MODULE mod_auth_db.c && mv mod_auth_db.o
   mod_auth_db.lo

   mod_auth_db.c: In function `get_db_pw':
   mod_auth_db.c:175: warning: passing arg 2 of pointer to function from
 incompatible pointer type
   mod_auth_db.c:175: warning: passing arg 4 of pointer to function makes
 pointer from integer without a cast
   mod_auth_db.c:175: too few arguments to function
   *** Error code 1

   Stop in /ad4/ENV/common/src/WWW/apache_1.3.27/src/modules/standard.


Sigh.

This was following the mod_perl instructions in the _Apache_ INSTALL file,
which say to
   configure mod_perl
   make
   make install
   ...
   configure Apache
   make
   make install

Said instructions leave out the test steps entirely, which doesn't give me
warm fuzzies anywhere...
-- 
- Vicki

Vicki Brown ZZZ  Journeyman Sourceror:
P.O. Box 1269  zz  |\ _,,,---,,_Scripts & Philtres
San Bruno, CA   zz /,`.-'`'-.  ;-;;,_Perl, Unix, MacOS
94066 USA |,4-  ) )-,_. ,\ ( `'-'
mailto:[EMAIL PROTECTED]  '---''(_/--'  `-'\_)  http://www.cfcl.com/~vlb



Re: test failed; ... t/httpd.conf

2003-02-08 Thread Stas Bekman
Vicki Brown wrote:

At 12:34 +1100 2003-02-09, Stas Bekman wrote:


Vicki, you are obviously missing some build steps.



Obviously :/



How about starting from
scratch again following the guide and get this frustration over?



Sadly, I started from scratch the first time.



Thousands of people have simply followed the instructions at:
http://perl.apache.org/docs/1.0/guide/getwet.html#Installing_mod_perl_in_Three_Steps



Those are the same steps I have been following. I reiterate:

Following the instructions in INSTALL-apaci (essentially identical to the web
page you supplied above)  I ran

  perl Makefile.PL APACHE_PREFIX=/usr/local/apache \
  APACHE_SRC=../apache_1.3.26/src DO_HTTPD=1 USE_APACI=1 EVERYTHING=1

  make

  make test

"The latter did many things" (meaning "printed many bytes of make output, cc
stuff, and cp commands to the screen...") and eventually complained

  Syntax error on line 3 of
  /ad4/ENV/common/src/WWW/mod_perl-1.27/t/conf/httpd.conf:
  Invalid command '=pod', perhaps mis-spelled or defined by a module not
  included in the server configuration

So, obviously, I needed to do a make clean in the apache tree... OK. I did
that. In fact, I downloaded a newer version of Apache.  I also added the
configure options I used to build Apache last time.

Then I tried again:

perl Makefile.PL APACHE_PREFIX=/usr/local/apache  \
APACHE_SRC=../apache_1.3.27/src DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 \
APACI_ARGS='--server-uid=www \
--server-gid=www \
--with-perl=/usr/bin/perl \
--with-layout=Apache \
--enable-module=most \
--enable-shared=max \
--enable-module=auth_db \
--enable-module=mmap_static \
--activate-module=src/modules/perl/libperl.a \
--enable-shared=perl \
--disable-module=auth_dbm \
--disable-rule=EXPAT  \
'

Now I get (at the end of the make test)
 ../apache_1.3.27/src/httpd: not found


This would seem to indicate that the "1 2 3" step process doesn't build
Apache (as it claims: "If your goal is just to build and install Apache 1.3
with mod_perl out of their source trees and have no special interests in
further adjusting or enhancing Apache... the following... builds Apache
statically with mod_perl, installs Apache under 
and mod_perl into the  hierarchy of your existing Perl
installation. All in one step.")


Ideas appreciated...  In the meantime, I will add a "4th step" and configure
Apache "by hand".


what happens if you do:

cd ../apache_1.3.27/src
make
cd -
make test

--


__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: test failed; ... t/httpd.conf

2003-02-08 Thread Vicki Brown
At 12:34 +1100 2003-02-09, Stas Bekman wrote:
>Vicki, you are obviously missing some build steps.

Obviously :/

>How about starting from
>scratch again following the guide and get this frustration over?

Sadly, I started from scratch the first time.

>Thousands of people have simply followed the instructions at:
>http://perl.apache.org/docs/1.0/guide/getwet.html#Installing_mod_perl_in_Three_Steps

Those are the same steps I have been following. I reiterate:

Following the instructions in INSTALL-apaci (essentially identical to the web
page you supplied above)  I ran

  perl Makefile.PL APACHE_PREFIX=/usr/local/apache \
  APACHE_SRC=../apache_1.3.26/src DO_HTTPD=1 USE_APACI=1 EVERYTHING=1

  make

  make test

"The latter did many things" (meaning "printed many bytes of make output, cc
stuff, and cp commands to the screen...") and eventually complained

  Syntax error on line 3 of
  /ad4/ENV/common/src/WWW/mod_perl-1.27/t/conf/httpd.conf:
  Invalid command '=pod', perhaps mis-spelled or defined by a module not
  included in the server configuration

So, obviously, I needed to do a make clean in the apache tree... OK. I did
that. In fact, I downloaded a newer version of Apache.  I also added the
configure options I used to build Apache last time.

Then I tried again:

perl Makefile.PL APACHE_PREFIX=/usr/local/apache  \
APACHE_SRC=../apache_1.3.27/src DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 \
APACI_ARGS='--server-uid=www \
--server-gid=www \
--with-perl=/usr/bin/perl \
--with-layout=Apache \
--enable-module=most \
--enable-shared=max \
--enable-module=auth_db \
--enable-module=mmap_static \
--activate-module=src/modules/perl/libperl.a \
--enable-shared=perl \
--disable-module=auth_dbm \
--disable-rule=EXPAT  \
'

Now I get (at the end of the make test)
 ../apache_1.3.27/src/httpd: not found


This would seem to indicate that the "1 2 3" step process doesn't build
Apache (as it claims: "If your goal is just to build and install Apache 1.3
with mod_perl out of their source trees and have no special interests in
further adjusting or enhancing Apache... the following... builds Apache
statically with mod_perl, installs Apache under 
and mod_perl into the  hierarchy of your existing Perl
installation. All in one step.")


Ideas appreciated...  In the meantime, I will add a "4th step" and configure
Apache "by hand".
-- 
- Vicki

Vicki Brown ZZZ  Journeyman Sourceror:
P.O. Box 1269  zz  |\ _,,,---,,_Scripts & Philtres
San Bruno, CA   zz /,`.-'`'-.  ;-;;,_Perl, Unix, MacOS
94066 USA |,4-  ) )-,_. ,\ ( `'-'
mailto:[EMAIL PROTECTED]  '---''(_/--'  `-'\_)  http://www.cfcl.com/~vlb



Re: test failed; ... t/httpd.conf

2003-02-08 Thread Vicki Brown
At 23:52 + 2003-02-08, Ged Haywood wrote:
>> It's very clear, actually, since I did nothing before these steps :)
>
>Then please ask of the person who logged on and started the shell
>what was the working directory when he left the building?

Come again?

>
>And so you
>
>> chown -R
>
>Hmmm.  Are you by any chance female?  :)

No. I AM THE SYSTEM ADMINISTRATOR OF THIS MACHINE.


-- 
- Vicki

Vicki Brown ZZZ  Journeyman Sourceror:
P.O. Box 1269  zz  |\ _,,,---,,_Scripts & Philtres
San Bruno, CA   zz /,`.-'`'-.  ;-;;,_Perl, Unix, MacOS
94066 USA |,4-  ) )-,_. ,\ ( `'-'
mailto:[EMAIL PROTECTED]  '---''(_/--'  `-'\_)  http://www.cfcl.com/~vlb



Re: test failed; ... t/httpd.conf

2003-02-08 Thread Stas Bekman
Vicki, you are obviously missing some build steps. How about starting from 
scratch again following the guide and get this frustration over? Thousands of 
people have simply followed the instructions at:
http://perl.apache.org/docs/1.0/guide/getwet.html#Installing_mod_perl_in_Three_Steps
and it just worked for them. 99.% that it'll work for you too ;)
More details can be found at: http://perl.apache.org/docs/1.0/guide/install.html

Hope it works out for you this time.

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Re: test failed; ... t/httpd.conf

2003-02-08 Thread David Dick



Hmmm.  Are you by any chance female?  :)

Please don't mess about with file ownerships, groups, permissions and
things if you aren't sure of what you're doing.  That's dangerous in a
Webserver and besides you can get in a real mess with the installation.
 


I'm probably just over-sensitive, but if i was getting frustrated with 
one of my servers and copped a call like that, i'd be booking a ticket 
to jubileegroup.co.uk armed with a cricket bat... :)

I wouldn't have a clue what is going vickie, but i ran the same set of 
commands on my linux box and it executed no worries.  If ya want, I can 
send the gzipped output (about 2k) off-list to give you something to 
compare against?



Re: test failed; ... t/httpd.conf

2003-02-08 Thread Ged Haywood
Hello again,

On Sat, 8 Feb 2003, Vicki Brown wrote:

> At 09:27 + 2003-02-08, Ged Haywood wrote:
> >It's not clear to me what you did BEFORE these steps, and that's
> >important.
> 
> It's very clear, actually, since I did nothing before these steps :)

Then please ask of the person who logged on and started the shell
what was the working directory when he left the building?

> this time the installation somehow made everything owned by root.

How inconsiderate of it...

Incidentally, at 09:27 + 2003-02-08, Ged Haywood *also* wrote:

> > I'd suggest you delete everything you've done thus far, then
> > create a new sub-directory in your home directory, e.g.
> > 
> > $ cd ~
> > $ mkdir /home/vicki/apache_mod_perl_test
> > 
> > and in it put two directories
> > 
> > $ /home/vicki/apache_mod_perl_test/apache_1.3.27
> > $ /home/vicki/apache_mod_perl_test/mod_perl-1.27
> > 
> > by grabbing the sources from some mirror somewhere and extracting them

And so you

> chown -R

Hmmm.  Are you by any chance female?  :)

Please don't mess about with file ownerships, groups, permissions and
things if you aren't sure of what you're doing.  That's dangerous in a
Webserver and besides you can get in a real mess with the installation.

> Then I ran make in the mod_perl directory and this time "make test" says
>  ../apache_1.3.27/src/httpd: not found
[snip]
> What am _I_ missing?

The compilation of the Apache binary, I guess.  That is what runs
(eventually) when you give the command to start the Webserver.  You
usually give the command to a script called 'apachectl', but that's
not necessarily the case.

The Apache binary is called 'httpd'.  Modules like mod_perl can be
added to it, to make it do funky stuff.  There are two ways to add a
module to Apache.  Er, more or less.  One way is to compile it into
the Apache binary (that's called 'static') and the other isn't.
That's called 'DSO' or 'Dynamic' or something even more impressive.

The former method gives you a kind of self-contained binary which
contains the module, the latter gives you a loadable object which the
httpd binary has to load from someplace.  It's told to load the module
(and where the module is:) by instructions in the configuration files.
You're trying to do the latter.  I'd recommend you don't do it that
way but there we are.

If you make mod_perl as a DSO, then you might be expected to have an
Apache all ready and waiting to load it.  If you make it static, then
you'll get one.  So if you make mod_perl as a DSO and you *don't* have
an Apache to load it then you have to make one.  So pop over to the
Apache directory (wherever it is:) and type 'make'.  Then go back to
the mod_perl directory and try 'make test' again.  If that doesn't
work you can always try my earlier suggestion.  Always works for me.

Here in France, it's ten to one in the morning so I'm going to bed.

Bon chance.

73,
Ged.





test failed; ... t/httpd.conf

2003-02-08 Thread Vicki Brown
At 09:27 + 2003-02-08, Ged Haywood wrote:
>Maybe you'll keep some records this time? :)

I kept records last time. But in between we upgraded FreeBSD and it's never
possible to keep ALL possible records. I _did_ have mod_perl. I tested it.
That was 8 months ago. Things morph.

At 09:27 + 2003-02-08, Ged Haywood wrote:
>It's not clear to me what you did BEFORE these steps, and that's
>important.

It's very clear, actually, since I did nothing before these steps :)

OK, I thought about this overnight and realized the =pod stuff _should_ work
if Apache has mod_perl built into it.  Since I am supposedly building Apache
and mod_perl concurrently,  it occurred to me I should "make clean" in my
Apache source and try again. Just in case.  And I pulled out my Apache
configure ops from last time (see, I _do_ keep notes) and stuck them where
the docs said to put "APACI_ARGS".  Presuming that's what "APACI_ARGS" means.
That isn't so clear...

At 09:27 + 2003-02-08, Ged Haywood wrote:
>Don't build as root, use a non-privileged account to configure

Well, that is an interesting suggestion. I usually don't but this time the
installation somehow made everything owned by root.  That said, back I go for
a chown -R

At 09:27 + 2003-02-08, Ged Haywood wrote:
>Note that I suggested using Apache 1.3.27 here,

Not a problem. We happened to be running 1.3.26 already.

At 09:27 + 2003-02-08, Ged Haywood wrote:
>You know, this is not very helpful at all.  Next time you post, let us
>know what OS you're using, stuff like that huh?

I usually do. "The later did many things and eventually" doesn't cover my OS
version; it covers several hundred lines of make output. Surely you can't be
asking me to post _that_?!

At 09:27 + 2003-02-08, Ged Haywood wrote:
>> Please Cc: me on replies so I don't miss them; I get the digest of this
>>list.
>
>Might be time to subscribe.  :)

Please re-read what I wrote. I _do_ subscribe. I subscribe to the digest. My
mail box does not need an additional hundred messages a day for each list I
subscribe to. The digest comes once a day. So I will rephrase - "Please do me
the courtesy of Cc:ing me directly on any reply so that I get your response
in a timely manner. Thank you."

-

This time I tried:
* download apache 1.3.27
* make clean in mod_perl directory
* all files are owneed by me

perl Makefile.PL APACHE_PREFIX=/usr/local/apache  \
APACHE_SRC=../apache_1.3.27/src DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 \
APACI_ARGS='--server-uid=www \
--server-gid=www \
--with-perl=/usr/bin/perl \
--with-layout=Apache \
--enable-module=most \
--enable-shared=max \
--enable-module=auth_db \
--enable-module=mmap_static \
--activate-module=src/modules/perl/libperl.a \
--enable-shared=perl \
--disable-module=auth_dbm \
--disable-rule=EXPAT  \
'

This time I am including all of the Apache configure options I used
previously.
I admit that I may not be understanding which ones to use. The list came with
assistance from others the _last_ time I tried to build mod_perl and Apache.

Disclaimer: I am _not_ a "C person". I do Perl. I rarely get these weird
configure options all correct without help.  Sigh.

Then I ran make in the mod_perl directory and this time "make test" says
 ../apache_1.3.27/src/httpd: not found


According to the  mod_perl INSTALL.apaci file, "If your goal is just to build
and install Apache 1.3 with mod_perl out of their source trees and have no
special interests in further adjusting or enhancing Apache... the following...
builds Apache statically with mod_perl, installs Apache under
 and mod_perl into the  hierarchy
of your existing Perl installation. All in one step."

But somehow it seems to be missing the "builds Apache" step.

What am _I_ missing?

For Ged, specifics -
This is FreeBSD 4.7, Mod_perl 1.27, Apache 1.3.27

-- 
- Vicki

Vicki Brown ZZZ  Journeyman Sourceror:
P.O. Box 1269  zz  |\ _,,,---,,_Scripts & Philtres
San Bruno, CA   zz /,`.-'`'-.  ;-;;,_Perl, Unix, MacOS
94066 USA |,4-  ) )-,_. ,\ ( `'-'
mailto:[EMAIL PROTECTED]  '---''(_/--'  `-'\_)  http://www.cfcl.com/~vlb



Re: test failed; =pod directive in t/httpd.conf

2003-02-08 Thread Ged Haywood
Hi there,

On Fri, 7 Feb 2003, Vicki Brown wrote:

> I'm trying to build (rebuild) mod_perl for Apache 1.3.26. I swear I did this
> before but it was over a year ago maybe it wasn't a static build.

Maybe you'll keep some records this time? :)

> Following the instructions in INSTALL-apaci  I ran
>   perl Makefile.PL APACHE_PREFIX=/usr/local/apache \
>   APACHE_SRC=../apache_1.3.26/src DO_HTTPD=1 USE_APACI=1 EVERYTHING=1
>   make
>   make test

It's not clear to me what you did BEFORE these steps, and that's
important.  Things like 'make clean' perhaps?  It's also not clear
from your post what account you were using.  Don't build as root, use
a non-privileged account to configure ('perl Makefile.PL'), compile
('make') and test ('make test').  Only switch to root to 'make
install' when the tests are all completed OK.  It doesn't matter where
you build, but I'd always do it in my home directory or somewhere in a
directory under /home that's set aside for this purpose - anyway, not
in /usr or /var or anything like that.  I'd suggest you delete
everything you've done thus far, then create a new sub-directory in
your home directory, e.g.

$ cd ~
$ mkdir /home/vicki/apache_mod_perl_test

and in it put two directories

$ /home/vicki/apache_mod_perl_test/apache_1.3.27
$ /home/vicki/apache_mod_perl_test/mod_perl-1.27

by grabbing the sources from some mirror somewhere and extracting them

$ cd /home/vicki/apache_mod_perl_test
$ tar xzvf apache_1.3.27
$ tar xzvf mod_perl-1.27

Then build as per the instructions in the Guide at

http://perl.apache.org

$ cd /home/vicki/apache_mod_perl_test/mod_perl-1.27
$ perl Makefile.PL ...

and Bob will I am sure be your proverbial uncle.  Note that I
suggested using Apache 1.3.27 here, but if you have some burning
desire to use 1.3.26 that's OK.  Just don't go and try anything older.
I always put my configuration options in a file makepl_args.mod_perl
in the /home/.../mod_perl-x.xx directory (see below) but that's just
preference (I get to keep a record of what I did that way:).

> The later did many things and eventually

You know, this is not very helpful at all.  Next time you post, let us
know what OS you're using, stuff like that huh?

> If this is meant to be an Apache httpd.conf, why does it have Perl
> stuff in it?

It's OK to have  sections in an Apache httpd.conf (or other
configuration file) as long as the Apache reading it has mod_perl
compiled in or loaded as a module.  There's some documentation around
here somewhere...

> Please Cc: me on replies so I don't miss them; I get the digest of this list.

Might be time to subscribe.  :)

73,
Ged.
--
makepl_args.mod_perl
--
USE_APACI=1
APACHE_PREFIX=/usr/local
APACHE_SRC=../apache_1.3.27/src
DO_HTTPD=1
EVERYTHING=1
ALL_HOOKS=1
PERL_SSI=1
PERL_SECTIONS=1
ADD_MODULE=info,status,proxy
APACI_ARGS=--sbindir=/usr/local/sbin/httpd_perl
APACI_ARGS=--sysconfdir=/usr/local/apache/httpd_perl/conf
APACI_ARGS=--runtimedir=/usr/local/apache/httpd_perl/run
APACI_ARGS=--logfiledir=/usr/local/apache/httpd_perl/logs
APACI_ARGS=--localstatedir=/usr/local/apache/httpd_perl/stat
APACI_ARGS=--proxycachedir=/usr/local/apache/httpd_perl/proxy
APACI_ARGS=--enable-module=rewrite
APACI_ARGS=--enable-module=include
APACI_ARGS=--enable-module=info