Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > How to test if I got Mod_Perl in apache?

Reply
Thread Tools

How to test if I got Mod_Perl in apache?

 
 
@
Guest
Posts: n/a
 
      10-03-2004
Is there any way to tell if mod_perl is installed in apache? I am using a
shared account. No root access.


 
Reply With Quote
 
 
 
 
Gregory Toomey
Guest
Posts: n/a
 
      10-03-2004
@ wrote:

> Is there any way to tell if mod_perl is installed in apache? I am using a
> shared account. No root access.


You probably can't if if have a shared account. As root, you need to type
type 'httpd -l ' and look for mode_perl.

And you will need to modify httpd.conf, which you probably cant do either.

Try a cheap VPS at www.linode.com or similar.

gtoomey
 
Reply With Quote
 
 
 
 
@
Guest
Posts: n/a
 
      10-03-2004
> > Is there any way to tell if mod_perl is installed in apache? I am using
a
> > shared account. No root access.

>
> You probably can't if if have a shared account. As root, you need to type
> type 'httpd -l ' and look for mode_perl.
>
> And you will need to modify httpd.conf, which you probably cant do either.
>
> Try a cheap VPS at www.linode.com or similar.
>
> gtoomey


However, PHP is included in the HTTP header. I thought if Mod_perl is
included, it should say something.

Another idea. Is there a program which will have different results in
mod_perl or none. Then I can test it with this script.


 
Reply With Quote
 
Gregory Toomey
Guest
Posts: n/a
 
      10-03-2004
@ wrote:

>> > Is there any way to tell if mod_perl is installed in apache? I am using

> a
>> > shared account. No root access.

>>
>> You probably can't if if have a shared account. As root, you need to type
>> type 'httpd -l ' and look for mode_perl.
>>
>> And you will need to modify httpd.conf, which you probably cant do
>> either.
>>
>> Try a cheap VPS at www.linode.com or similar.
>>
>> gtoomey

>
> However, PHP is included in the HTTP header. I thought if Mod_perl is
> included, it should say something.
>
> Another idea. Is there a program which will have different results in
> mod_perl or none. Then I can test it with this script.


If Apache does not say 'mod_perl' in the headers it is unlikely to be
installed.

You really need root access to configure mod_perl.

gtoomey
 
Reply With Quote
 
@
Guest
Posts: n/a
 
      10-03-2004
> @ wrote:
>
> >> > Is there any way to tell if mod_perl is installed in apache? I am

using
> > a
> >> > shared account. No root access.
> >>
> >> You probably can't if if have a shared account. As root, you need to

type
> >> type 'httpd -l ' and look for mode_perl.
> >>
> >> And you will need to modify httpd.conf, which you probably cant do
> >> either.
> >>
> >> Try a cheap VPS at www.linode.com or similar.
> >>
> >> gtoomey

> >
> > However, PHP is included in the HTTP header. I thought if Mod_perl is
> > included, it should say something.
> >
> > Another idea. Is there a program which will have different results in
> > mod_perl or none. Then I can test it with this script.

>
> If Apache does not say 'mod_perl' in the headers it is unlikely to be
> installed.
>
> You really need root access to configure mod_perl.
>
> gtoomey


I agree. That is one server shows it
2004-10-03 03:41:30.401 Server: Apache/1.3.28 (Unix) PHP/4.3.3 mod_perl/1.28
mod_ssl/2.8.15 OpenSSL/0.9.7c
Another does not:
2004-10-03 03:42:59.700 Server: Apache/1.3.31 (Unix) mod_gzip/1.3.26.1a
mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.3.8
FrontPage/5.0.2.2634a mod_ssl/2.8.19 OpenSSL/0.9.7a
Here is mine:
2004-10-03 03:44:17.782 Server: Apache/1.3.29 (Unix)
However, mine does have PHP, so it is very possible that the Apache is set
up not to say anything about those added headers.

So I am still looking for a script to test it.




 
Reply With Quote
 
Sherm Pendley
Guest
Posts: n/a
 
      10-03-2004
@ wrote:

> I agree.


Gregory was not giving you an opinion, he was informing you of a fact.
Good of you to agree with the facts though.

> Here is mine:
> 2004-10-03 03:44:17.782 Server: Apache/1.3.29 (Unix)


Your server does not have mod_perl installed. See how easy that was?

> However, mine does have PHP, so it is very possible that the Apache is set
> up not to say anything about those added headers.


Possible? Sure, anything's possible - including little green men on
Mars. But I won't bet on that, or on your server having mod_perl and not
reporting it.

> So I am still looking for a script to test it.


Why? Just ask your hosting provider, and they'll tell you that you don't
have it.

So what's got your panties in a bunch over mod_perl? Between this series
of posts, and the other ones in the "PHP vs. Perl" thread, I highly
doubt you'll be able to make effective use of it anyway.

It's not a simple matter of just sprinkling your site with some sort of
"magic mod_perl dust" and making it go faster - for any chance at *real*
improvement, you have to write your scripts with mod_perl in mind, and
optimize them to take advantage of the persistent environment.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
 
Reply With Quote
 
@
Guest
Posts: n/a
 
      10-03-2004
> > Here is mine:
> > 2004-10-03 03:44:17.782 Server: Apache/1.3.29 (Unix)

>
> Your server does not have mod_perl installed. See how easy that was?
>
> > However, mine does have PHP, so it is very possible that the Apache is

set
> > up not to say anything about those added headers.

>
> Possible? Sure, anything's possible - including little green men on
> Mars. But I won't bet on that, or on your server having mod_perl and not
> reporting it.


If it has PHP but not report it, then it is possible for mod_perl too.
In fact, openssl is working but not reported too.

I just want to know if my perl cgi is faster than PHP is because I got
mod_perl or the fact is PHP is still too much slower than Perl regardless of
apache settings.


 
Reply With Quote
 
Sherm Pendley
Guest
Posts: n/a
 
      10-03-2004
@ wrote:

> I just want to know if my perl cgi is faster than PHP is because I got
> mod_perl


It's not. As I said, you need to be aware of mod_perl and write your
code specifically to take advantage of it to see any significant
performance boost.

So even if you *did* have mod_perl on your server - and I'm certain that
you don't - you wouldn't be getting any performance gains from it,
because you haven't optimized your Perl code for it.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
 
Reply With Quote
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      10-03-2004
Sherm Pendley wrote:
> So even if you *did* have mod_perl on your server - and I'm certain
> that you don't - you wouldn't be getting any performance gains from
> it, because you haven't optimized your Perl code for it.


Quote from http://perl.apache.org/start/tips/registry.html :

"Existing CGI scripts will run much faster under mod_perl."

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      10-03-2004
@ wrote:
> Is there any way to tell if mod_perl is installed in apache? I am
> using a shared account. No root access.


You can check whether $ENV{MOD_PERL} is set. If it is, your script is
running under mod_perl, if not, mod_perl is not enabled for your
account whether it happens to be installed or not.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
mod_perl installed, but mod_perl.so file not created bennett@peacefire.org Perl Misc 2 01-25-2006 10:53 PM
mod_perl - dbi - DBD:Pg performance test, old vs new Pablo S Perl 0 09-01-2004 04:21 AM
test test test test test test test Computer Support 2 07-02-2003 06:02 PM
mod_perl 2 test failure at filter/in_bbs_msg (server side failed) - Perl Misc 0 06-26-2003 02:21 PM



Advertisments