FW: interrogating servers for info...
- Hello people..
I have found that the single biggest problem I have with other people
loading my scripts onto their servers is that
there is no definative way (that I know of) that I can find to find out how
that server has been setup..
Is there a way I can write a perl script that can give me the details of the
I know about %ENV so that is ok.
I know how to run `which perl`
and `perl -V` and display the results.
ditto with 'which sendmail'
but what about apache?
I guess what I am asking is in three parts.
1. Can a perl script find out what version of apache is running?
2. Can a perl script find out how apache is setup? ie does it run cgi
scripts as the username of the account,
or as user "nobody" or "apache".
3. can a perl script test for the existance of certain perl modules? (or do
you just do an eval on a "use module" command?)
I want to make a cgi script that displays all the info it can find out about
the server. so it can make
accurate suggestions as to file permissions, and settings for mail and any
changes needed to run on the version
of perl the server has....as well as listing missing modules that are
(obviously this is not a script that people should leave on their server
once they have everything workin as you'd be
asking to get hacked by providing that much info about the server.) but it'd
be handy for newbies trying to install a shopping cart.....
Any tips would be most appreciated.