Apache::Test fails install with apachessl

Hi,

I can’t get Apache::Test to install. It says “no test server
configured”, but I can lynx localhost, and get:
Hey, it worked !
The SSL/TLS-aware Apache webserver was
successfully installed on this website.

I tried passing the httpd location like so:

HTTPD=/usr/local/apache/1.3.28/ssl/bin/ perl -MCPAN

-e’install Apache::Test’

and also using ‘o conf makepl_arg’ from the CPAN shell.

Any tips?

Here’s the full test error:

Running make test
/usr/bin/perl -Iblib/arch -Iblib/lib
t/TEST -clean
*** setting ulimit to allow core files
ulimit -c unlimited; t/TEST -clean
APACHE_USER= APXS= APACHE_PORT= APACHE_GROUP= APACHE=
/usr/bin/perl -Iblib/arch -Iblib/lib
t/TEST -verbose=0
*** setting ulimit to allow core files
ulimit -c unlimited; t/TEST -verbose=0
!!! no test server configured, please specify an httpd or apxs or put
either in your PATH. For ex
ample:
t/TEST -httpd /path/to/bin/httpd
make: *** [run_tests] Error 1
/usr/bin/make test – NOT OK
Running make install
make test had returned bad status, won’t install without force

I had written:

I can’t get Apache::Test to install. It says “no test server
configured”, but I can lynx localhost, and get:
Hey, it worked !
The SSL/TLS-aware Apache webserver was
successfully installed on this website.

I tried passing the httpd location like so:

HTTPD=/usr/local/apache/1.3.28/ssl/bin/ perl -MCPAN

-e’install Apache::Test’

I had no luck with this line of thinking, so I ended up doing this:

export PATH=“/usr/local/apache/1.3.28/ssl/bin:$PATH”

That worked.

Now a permissions problem comes up. I found this thread at:
installing Apache::Test via CPAN impossible as root

installing Apache::Test via CPAN impossible as root* From: Udo Rader * Subject: installing Apache::Test via CPAN impossible as root * Date: Tue, 26 Aug 2003 12:58:20 +0000

hi all,

I’m trying to setup Apache::Test with our apaches and have run into major
troubles.

CPAN refuses to install the mod without force, because all tests completely
fail. t/logs/error_log then contained error messages like these:

-----error_log------
[…]
[Tue Aug 26 14:23:47 2003] [error] [client 127.0.0.1] (13)Permission denied:
access to /index.html failed because search permissions are missing on a
component of the path
[…]
-----error_log------

never saw such an apache error message … ? search permissions are
missing ? what kind of stuff is that?

But a google search quickly pointed me to the source of the problem:
In a default linux & perl installation Apache::Test is very unlikely
to be installable by root (http://dbforums.com/t859484.html).

I tried to make && make test the package as a “normal” user and I succeded.
Depending on my security settings this is however just luck:

If the above posting on dbforums is correct, then the problem is because
the unpacking and building is done by user root whereas all files below t/
are chowned to the actual apache test user.

Now this works fine as long as the apache test user is allowed to access
root’s .cpan build area at all, and I doubt that on most systems a normal
user (such as the apache test user) will be allowed to access anything
within ~root and thus “make test” will fail.

Are there arguments against running those tests as root?

for the record:
get this for apache 1.3.28 and mp1.28 as well as with apache 2.0.47 and
mp1.99_09.

udo

This was the conclusion of the thread, found at:
Re: installing Apache::Test via CPAN impossible as root

Re: installing Apache::Test via CPAN impossible as root

* From: Stas Bekman
* Subject: Re: installing Apache::Test via CPAN impossible as root
* Date: Tue, 26 Aug 2003 18:43:19 +0000 

Thanks Nathan,

We have discussed this idea at the dev list, and will probably resort to it if no better solution is found. I didn’t mention it on purpose in hope to get some new, better ideas.

The problem with copy and cleanup to a temp dir is that some project may have a pretty big t/ directory (mp2’s one is almost 2MB and growing), so copying is going to be quite slow. Another problem is the cleanup, which may not always work very well.

Moreover, let’s say that you run under ‘root’. Most likely File::Temp/File::Spec::tmpdir will return /root/tmp as the temp dir, so it solves nothing. What we really want is an equivalent of /tmp.

What we could do is prompt root for two inputs: a username of a real user (e.g. ‘stas’ on my machine) and a dir where ‘stas’ can write to (e.g. /home/stas/tmp) and then copy the files there and use that username to run the test with.

In my original reply the best advise so far to avoid this problem is to configure your .cpan dir to be under /tmp in which case running tests as root is not a problem. However /tmp is often setup to be cleaned up on reboot, so you may want to configure only ‘build_dir’ to be on that filesystem, e.g.:

#~/.cpan/CPAN/MyConfig.pm
$CPAN::Config = {
‘cpan_home’ => q[/root/.cpan],
‘build_dir’ => q[/tmp/.cpan/build],

};

Stas Bekman JAm_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