Mr. Shawn H. Corey a écrit :
On Tue, 2006-20-06 at 11:49 +0200, sfantar wrote:
  Why are there differences between the output of the CGI mentioned below
  which displays the content of $ENV{HOME} et $ENV{PATH}?

CGIs are forked off of the web server, which normally runs under a
different user. Add these lines to your CGI to see who is running the
script:

  print "<p>login: ", getlogin, </p>\n";
  print "<p>uid: ", $<, "</p>\n";
  print "<p>name: ", getpwuid($<), "</p>\n";



These lines are very useful. I saw the differences between the outputs when the script is run from the server and from the command line.

"CGIs are forked off of the web server, which normally runs under a
"different user."

I understand the fact that's the CGIs are run by a different user.
Is this user the same as the one who launched Apache?

How about mod_perl? If I run under mod_perl a script, is this one forked off as well?

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to