Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Access system ENV variables from within CGI Script

by arcnon (Monk)
on Oct 12, 2007 at 14:00 UTC ( [id://644486]=note: print w/replies, xml ) Need Help??


in reply to Access system ENV variables from within CGI Script

a cgi script runs as wwwrun or www or whatever. Which is why it can't get at a "user" .profile.

From my understanding the .profile was a config file that isn't loaded until you launch a terminal session and unloaded on close. Usually the profile.local is the global profile.

Perhaps the better question is what you are trying to glean from the file that might be gleaned thur another way.
  • Comment on Re: Access system ENV variables from within CGI Script

Replies are listed 'Best First'.
Re^2: Access system ENV variables from within CGI Script
by Corion (Patriarch) on Oct 12, 2007 at 14:14 UTC

    A .profile file is not a "config file". It is an executable program which is run by a shell language interpreter. The only way to faithfully reproduce arbitrary settings made via executing a .profile shell program is by running that shell program or by writing a shell program interpreter. Of course, simple settings can be extracted via crafty regular expressions.

      wow I always thought that /etc/profile.d was the exe and that when run by the terminal loaded/ran the .profile.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-24 17:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found