Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I'm having a problem with a perl script on an apache server using mod_perl. This is a mostly default mandrake 8.1 install, but I know my way around apache configs.

This is a very _old_ server, and it literally takes 21% of the cpu to launch this cgi. It takes a few (maybe 5) seconds to actually display to the browser. However, it takes less than one second if i rename 'index.cgi' to 'index.pl'. As I understand it, this is mod_perl working for me. Now, a friend told me I could use Apache::Registry to 'cache' the file in the server so that it would not have to re-read it every time (the pod seems to agree with this). So I tossed a use Apache::Registry in there, and let 'er rip.

First, the page displays right the first and only time I load it. then after that, it just spits out the source. If add '.pl' to the "add handler" section of the config file (after .cgi), it seems that mod_perl does not get to process it, and it reverts to being slow.

I do in fact have the

<IfModule mod_dir.c> DirectoryIndex index.html index.php index.php3 index.shtml index.c +gi index.pl index.htm Default.htm default.htm </IfModule>
directive in the config file. I suspect that it may have something to do with:
q(<meta http-equiv="refresh" CONTENT="10; URL=http://envy.posixnap.net +/">),
and the caching of browsers and the like. Has anyone seen behaviour like this out of mod_perl? I'm rather new to it.

Thanks,
brother dep.

--
Laziness, Impatience, Hubris, and Generosity.


In reply to mod_perl and Apache::Registry (code) by deprecated

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 19:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found