Help - Search - Members - Calendar
Full Version: Perl Diver v1.1
The Planet Forums > Control Panels > Plesk
cfh
I can not get this to work.
http://www.scriptsolutions.com/programs/fr...free/perldiver/
follow all directions
this is what I get displayed when I try and run it.
#!/usr/bin/perl -w

################################################################
# #
# PerlDiver v1.1 #
# Copyright ©1999 - Tintagel Consulting, LLC #
# dba Script Solutions #
# http://www.scriptsolutions.com/ #
# All rights reserved #
# #
################################################################
# #
# PURPOSE OF PROGRAM: #
# #
# PerlDiver v1.1 gives you the location of your sendmail #
# program, your path to perl, your environment variables and #
# most (not all) of the Perl modules that are installed on #
# your web server. #
# #
# #
# INSTRUCTIONS: #
# #
# Complete instructions and the newest version are located at: #
# http://www.scriptsolutions.com/programs/fr...free/perldiver/ #
# #
# #
# LICENSE AGREEMENT: #
# #
# By downloading and installing PerlDiver v1.1, you have #
# agreed to indemnify, defend, and hold harmless Tintagel #
# Consulting, LLC dba Script Solutions from any and all #
# liability, penalties, losses, damages, costs, expenses, #
# attorneys' fees, causes of action or claims caused by or #
# resulting indirectly from your use of this script which #
# damages either you, or any other party or parties without #
# limitation or exception. This indemnification and hold #
# harmless agreement extends to all issues associated with #
# this script. #
# #
################################################################


################################################################
# DO NOT CHANGE ANYTHING BELOW #

$sendmail =`whereis sendmail`;$plocation =`whereis perl`;@perlloc = split(" ",$plocation);@mailloc = split(" ",$sendmail);$font = '';&vars;print "Content-type: text/htmlnn";print qq~$program $version
 
 

$dev
$program $version

$fontServer Program Paths

${font}Perl Executable: ${font}$^X
${font}Perl Version: ${font}$]
${font}PERL compile version OS: ${font}$^O
${font}GID: (If not blank, you are on a machine that supports membership in multiple groups simultaneously) ${font}$<
${font}Location of Perl: ${font}~;foreach $loc(@perlloc){ print "$loc
n";} print qq~
${font}Location of Sendmail: ${font}~;foreach $ml(@mailloc){ print "$ml
n";} print qq~
${font} Directory locations searched for perl executables$font~;foreach $item(@INC){ print "$item
n";} print qq~

$fontEnvironment Variables

~;foreach $fieldname(keys %ENV){ print qq~ ~;} print qq~
${font}$fieldname ${font}$ENV{$fieldname}

$fontInstalled Modules

~;find(&wanted,@INC);$modcount = 0;foreach $line(@foundmods){ $match = lc($line); if ($found{$line}[0] >0) {$found{$line} = [$found{$line}[0]+1,$match]} else {$found{$line} = ["1",$match];$modcount++}}@foundmods = sort count keys(%found);sub count {return $found{$a}[1] cmp $found{$b}[1]}$third = $modcount/3;$count=0;print "
";foreach $mod(@foundmods){ chomp $mod; $count++; if ($count <= $third){ print qq~~; } else {push (@mod1,$mod)}}print "
${font}$mod
";$count = 0;foreach $mod1(@mod1){ chomp $mod1; $count++; if ($count <= $third){ print qq~~; } else {push (@mod2,$mod1)}}print "
${font}$mod1
";$count = 0;foreach $mod2(@mod2){ chomp $mod2; $count++; if ($count <= $third){ print qq~~; }}print qq~
${font}$mod2


${font}The latest version of $program can always be found on ${dev}'s web site.

$font© 1999, ScriptSolutions™, a Tintagel project.

 
 
~;exit;sub vars {$dev="ScriptSolutions™";use File::Find;$bgcolor = "GHOSTWHITE";$program="perl diver";$version="1.1";}sub wanted { $count = 0; if ($File::Find::name =~ /.pm$/){ open(MODFILE,$File::Find::name) || return; while(){ if (/^ *package +(S+);/){ push (@foundmods, $1); last; } } }}
RS-18728
I use env.pl it is very cool and easy to setup!

I do not know what is wrong with the script you are running but I will install it on my server and see if I can get it to work for me!

Anyway to download this script I use go to:
Click Here

Mitch Davis
NorthernQ.com
cfh
I get the script to work only if I put it in the cgi-bin directory.
I thought the cgi-bin was alliased and cgi files could work from any directory. Let me know what you find.
RS-18728
ok I am fairly new to this but I believe to have to uncomment the AddHandler! Correct me if I am wrong.

One question why don't you want it into the cgi-bin
cfh
It is not that I do not want it there it is just that for scripts that have graphics works best if those files are out side that directory. It would be easier to call them all from 1 place.
mouse
QUOTE
Originally posted by cfh
I get the script to work only if I put it in the cgi-bin directory.
I thought the cgi-bin was alliased and cgi files could work from any directory. Let me know what you find.


if it runs from the cgi-bin, what is the problem? its only purpose is to tell you what modules and such are installed on the machine and as you state, it works correctly when in the proper directory?
if your trying to run this outside of the cgi-bin you would need to be looking into how=to run cgi outside of cgi-bin which would have nothing to do with this script.. Mouse
cfh
I was using this sript as an example.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.