@
@
Is there any way to tell if mod_perl is installed in apache? I am using a
shared account. No root access.
shared account. No root access.
@ said: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
@ said: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.
@ said: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
@ said:I agree.
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.
Your server does not have mod_perl installed. See how easy that was?
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.
@ said:I just want to know if my perl cgi is faster than PHP is because I got
mod_perl
Sherm said: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.
@ said:Is there any way to tell if mod_perl is installed in apache? I am
using a shared account. No root access.
@ said:Is there any way to tell if mod_perl is installed in apache? I am using a
shared account. No root access.
@ said: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.
Gunnar said:Quote from http://perl.apache.org/start/tips/registry.html :
"Existing CGI scripts will run much faster under mod_perl."
Sherm said:That has not been my experience - and I've done a *lot* of
mod_perl, for sites that get more traffic than slashdot.
On the other hand, the scripts I've worked with have been as small
and tight as I could make them to begin with. They didn't benefit
all that much by simply dropping them into Apache::Registry, since
the compiler overhead for those scripts wasn't all that much to
begin with.
I can see where the difference would be much more dramatic though,
if you're dealing with a 10kloc behemoth that spends as much or
more time compiling than it does running. ;-)
Douglas said:I just benched the smallest and tightest script I could come up
with:
#!/usr/bin/perl
print "Content-Type: text/html\r\n\r\n";
print "<html>Hello World!</html>";
{grin}
A vanilla CGI run of 3000 (using ab -n 3000) gave me 175.36
requests per second. Moving that over to mod_perl and
Apache::Registry gave me 298.15. I'd call that a significant
difference.
Douglas said:I'd be interested in hearing more about your typical configuration. Do
you use fastcgi or Pperl? I believe that statement assumes a typical CGI
environment rather than a persistent one.
I just benched the smallest and tightest script I could come up with:
#!/usr/bin/perl
print "Content-Type: text/html\r\n\r\n";
print "<html>Hello World!</html>";
Randal said:There's an implied "when rewritten to be compatible with
Apache::Registry or as a proper handler" missing from that
sentence.
This is mine:This is a tip I have, but I don't use mod_perl so it's just "as is".
#!/usr/bin/perl
print "Content-type: text/html\n\n";
while (($key,$value) = each %ENV) {
print "$key=$value<br>";
}
# look for the line saying "Gateway Interface". If it says "CGI/1.1"
# then you are using the standard apache-perl interface, but if it says
#"CGI-Perl/1.1" then you are running it through mod_perl
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.