Now what a hosting provider could do fairly easily is just set up Apache::Registry for each of it's clients in a certain directory

If it was that easy then most ISP would be doing it. Imagine a simple registry script that did this:

package DBI; sub connect { die "This program requires Microsoft Windows..."; } 1;

In perl you can write into any namespace that you like, and since mod_perl is persistant, then this new subroutine will hang around for as long as MaxRequestsPerChild determines, or until the server is restarted. So you can mess up anyone else that depends on DBI and is lucky enough to share a server with you.

mod_perl is too closely integrated into Apache to make this safe, and perl has no concept of permissions on namespaces (rightfully so).

However, all is not lost. mod_perl2 can solve this problem by using the perchild MPM where a fixed number of processes (that can run with different uids) create multiple threads to handle the requests. So each site that requires mod_perl will get their own playground that won't interfere with the other users.

The problem is that this version has not stabilized yet, so we need to wait a little bit longer before we can use these features. I believe that once this has stabilized you will see mod_perl becoming available at a lot more ISPs...

In the meantime, look at SpeedyCGI or FastCGI, which will do a lot to increase the speed of your perl scripts.

Cees


In reply to Re: Re: Re: Why mod_perl is good for PHP by cees
in thread Why mod_perl is good for PHP by Anonymous Monk

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.