Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: mod_perl vs. mod_php in multi-user environments

by fruiture (Curate)
on May 14, 2003 at 11:51 UTC ( #258042=note: print w/ replies, xml ) Need Help??


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

In mod_php an actually executed script is one limited scope within the "big program" that runs all the time, just like a mod_perl handler, but from within that scope you don't have acces to any data "above in the big program"", with mod_perl you have that access and can manipulate that "big program" and that enables you to a) do many much cooler things with mod_perl and b) do many nasty things and break more. Imagine a wrapper under mod_perl that executes a handler and causes _any_ variable in that handler to be declared via my() by default, even those who already exist as globals.

# in PHP this code: $foo = 'abc'; # creats such a private variable # in Perl $foo = 'abc'; # would change the package global $foo # or yield an error under strict

Then the handler code would be limited to it very self, comparable to a PHP script. It could still store persistent information through limited interfaces (like the mysql_ functions of PHP). In mod_php that "big program" is not a PHP script itself and there are no "superglobal" PHP variables, in mod_perl there is a "big program" that has a globel scope.

Such a wrapper would mean to emulate Perl with some changes in the guts (concering limitation of access to global variables, sounds strange, is strange).

--
http://fruiture.de


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://258042]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2015-07-04 10:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls