You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Mat <ma...@hotmail.com> on 2001/09/12 15:41:45 UTC

Knowing if a apache server is compiled with mod_perl

Hi everyone,
   I'd like to know if there is a simple way to find if an apache server 
is compiled with mod_perl and with which version. My aim is to write a 
script which compile mod_perl if it is not installed.
   For the moment I've found only two ways, launch the actual server and 
telnet it to parse the server signature. But it has the disadvantages of 
having the Apache server running and the server signature on.
   The other way  would be to get the return of httpd -v, but I won't 
have the version and I think this won't work if the module is compiled 
in dso.
  
   So is it possible from the Apache binary to check mod_perl ?

Cheers,
       Mat


Re: Knowing if a apache server is compiled with mod_perl

Posted by Mark Schmick <ma...@webz.com>.
Adam's technique below doesn't work for me, but this does (assuming you
have LWP installed):

sh> HEAD -de http://<server_you're_interested_in>|grep Server:

-Mark

At 05:20 PM 9/17/2001 +0100, Adam Worrall wrote:
> >>>>> "Mat" == Mat  <ma...@hotmail.com> writes:
>
>     Mat> Hi everyone, I'd like to know if there is a simple way to find
>     Mat> if an apache server is compiled with mod_perl and with which
>     Mat> version.
>
>This does it for me:
>
>   $ strings /some/httpd | grep 'mod_perl\/'
>
>The 'strings' command works under Linux and Solaris, I think it's fairly
>standard ... and handy :)
>
>  - Adam



Re: Knowing if a apache server is compiled with mod_perl

Posted by Ron Beck <rb...@tqtx.com>.
You want to parse through the info returned from...

	httpd -l

For example, here's my httpd -l...

	trex% httpd -l
	Compiled-in modules:
 	http_core.c
 	mod_env.c
 	mod_log_config.c
	mod_mime.c
 	mod_negotiation.c
  	mod_status.c
	mod_include.c
 	mod_autoindex.c
 	mod_dir.c
 	mod_cgi.c
  	mod_asis.c
  	mod_imap.c
 	mod_actions.c
 	mod_userdir.c
  	mod_alias.c
  	mod_access.c
  	mod_auth.c
 	mod_setenvif.c

Hope this helps!
Ron


Mat wrote:
> 
> Hi everyone,
>    I'd like to know if there is a simple way to find if an apache server
> is compiled with mod_perl and with which version. My aim is to write a
> script which compile mod_perl if it is not installed.
>    For the moment I've found only two ways, launch the actual server and
> telnet it to parse the server signature. But it has the disadvantages of
> having the Apache server running and the server signature on.
>    The other way  would be to get the return of httpd -v, but I won't
> have the version and I think this won't work if the module is compiled
> in dso.
> 
>    So is it possible from the Apache binary to check mod_perl ?
> 
> Cheers,
>        Mat

Re: Knowing if a apache server is compiled with mod_perl

Posted by Steven Lembark <le...@wrkhors.com>.

-- Mat <ma...@hotmail.com>

> Hi everyone,
>    I'd like to know if there is a simple way to find if an apache server
> is compiled with mod_perl and with which version. My aim is to write a
> script which compile mod_perl if it is not installed.    For the moment
> I've found only two ways, launch the actual server and telnet it to parse
> the server signature. But it has the disadvantages of having the Apache
> server running and the server signature on.    The other way  would be to
> get the return of httpd -v, but I won't have the version and I think this
> won't work if the module is compiled in dso.      So is it possible from
> the Apache binary to check mod_perl ?

If the server is compiled w/ mod_info check that for mod_perl.

--
Steven Lembark                                               2930 W. Palmer
Workhorse Computing                                       Chicago, IL 60647
                                                            +1 800 762 1582

Knowing if a apache server is compiled with mod_perl

Posted by Adam Worrall <ab...@yahoo.com>.
>>>>> "Mat" == Mat  <ma...@hotmail.com> writes:

    Mat> Hi everyone, I'd like to know if there is a simple way to find
    Mat> if an apache server is compiled with mod_perl and with which
    Mat> version.

This does it for me:

  $ strings /some/httpd | grep 'mod_perl\/'

The 'strings' command works under Linux and Solaris, I think it's fairly
standard ... and handy :)

 - Adam