in reply to mod_perl vs. mod_php in multi-user environments

Using mod_perl raw in an untrusted environment would indeed be a challenge. However, PHP is more like using HTML::Embperl or Apache::Template.

I've not completed my research, but I believe that if an ISP offered an Apache::Template environment with the proper safe plugins (and no chance to "escape" to Perl), you'd effectively get PHP-like scriptability with TT as the scripting language, and access to the entire CPAN through approved plugins.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re: mod_perl vs. mod_php in multi-user environments

Replies are listed 'Best First'.
Re: •Re: mod_perl vs. mod_php in multi-user environments
by crenz (Priest) on May 14, 2003 at 11:15 UTC

    However, PHP is more like using HTML::Embperl or Apache::Template.

    Is this true even if we talk about mod_php rather than using PHP in CGI mode?

    Basically, I am just astonished that mod_perl vs. perl as interpreter for CGI scripts seems to be so very different to mod_php vs php as interpreter for CGI scripts. I am wondering how mod_php can reap the benefits of being an Apache module without suffering the same consequences as mod_perl (e.g. shared namespace). Or is mod_perl offering much more than mod_php?

      Or is mod_perl offering much more than mod_php?
      Yes, but I thought I had already made that point in the first step.

      mod_perl is raw access to every phase of the Apache request and service cycle. mod_php is an Apache::Template-like access to the content phase only and thus far more limited.

      So to get "mod_perl" to act like PHP, you have to restrict it severely.

      -- Randal L. Schwartz, Perl hacker
      Be sure to read my standard disclaimer if this is a reply.

        Yes, but I thought I had already made that point in the first step

        Sorry, that was a misunderstanding on my part. Because you said "PHP", I thought you meant the PHP interpreter as CGI, rather than mod_php. Anyway, thanks for the good explanations, everyone -- hearing all these things about mod_perl makes me want to use it for a project :).