cancel
Showing results for 
Search instead for 
Did you mean: 

Perl version and modules on new CGI server?

nkhughes
Dabbler
Posts: 21
Thanks: 2
Registered: ‎17-09-2007

Perl version and modules on new CGI server?

Subject line says it all....how do I find out what version of Perl is running on 91.136.8.9, and what modules are installed?
Thanks.
12 REPLIES 12
bobpullen
Community Gaffer
Community Gaffer
Posts: 16,887
Thanks: 4,979
Fixes: 316
Registered: ‎04-04-2007

Re: Perl version and modules on new CGI server?

v5.10.1 by the looks of things.
#!/bin/bash
echo "Content-type: text/html"
perl --version

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵

nkhughes
Dabbler
Posts: 21
Thanks: 2
Registered: ‎17-09-2007

Re: Perl version and modules on new CGI server?

Quote from: Bob
v5.10.1 by the looks of things.

Great...thanks.
I did try the following to find out the installed modules, which works on my intranet CGI server, but it's failing (status 500) on CCGI. Could be timing out.

use strict;
use ExtUtils::Installed;
use CGI;
my ($inst) = ExtUtils::Installed->new( skip_cwd => 1 );
my (@modules) = $inst->modules();
my $query = new CGI;
print $query->header;
print $_."\n" foreach (@modules);

If all else fails, I'll just have to test if the modules I need exist.
bobpullen
Community Gaffer
Community Gaffer
Posts: 16,887
Thanks: 4,979
Fixes: 316
Registered: ‎04-04-2007

Re: Perl version and modules on new CGI server?

I suspect the platform's locked down and won't let you do that. If you specify the -w argument with the shebang then you get:
Can't open file /usr/lib/perl5/site_perl/5.8.8/i686-linux/auto/IO/Zlib/.packlist: Permission denied at /usr/share/perl5/ExtUtils/Installed.pm line 96

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵

nkhughes
Dabbler
Posts: 21
Thanks: 2
Registered: ‎17-09-2007

Re: Perl version and modules on new CGI server?

Hmmm....I did have
Quote
#!/usr/bin/perl -w

at the top of my script (I somehow managed to omit it from my post though) but I didn't get that error back. Mind you, I only tested with the browser - are you getting that in a log, or running the script from the command line on CCGI? I can't find any FAQ indicating that I can telnet/ssh in to test these scripts on the new server.
dick:quote
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Perl version and modules on new CGI server?

Actually that message is a fatal one, not a warning. You need to include…
use CGI::Carp qw/fatalsToBrowser/;

… so that the fatal message is also sent to the browser.
David
David
bobpullen
Community Gaffer
Community Gaffer
Posts: 16,887
Thanks: 4,979
Fixes: 316
Registered: ‎04-04-2007

Re: Perl version and modules on new CGI server?

Suitably corrected. Thanks David Smiley

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵

nkhughes
Dabbler
Posts: 21
Thanks: 2
Registered: ‎17-09-2007

Re: Perl version and modules on new CGI server?

Thank you both...I can see the error in the browser now  Smiley
A bit worried though...it seems to be checking a different set of modules (5.8.8 ) to the running version of Perl (5.10.1) Huh
I've also sent a query to PlusNet support  to see if I can get a list of installed modules.
bobpullen
Community Gaffer
Community Gaffer
Posts: 16,887
Thanks: 4,979
Fixes: 316
Registered: ‎04-04-2007

Re: Perl version and modules on new CGI server?

I'll reach out to our hosting partner for comment Neil...

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵

bobpullen
Community Gaffer
Community Gaffer
Posts: 16,887
Thanks: 4,979
Fixes: 316
Registered: ‎04-04-2007

Re: Perl version and modules on new CGI server?

Hi Neil,
The version of Perl that's installed is indeed 5.10.1. You should also find that your script to list the installed modules works OK now too. I've uploaded a copy to your cgi-bin called modules.pl, output as follows:
Quote
Apache::GD::Graph Archive::Tar Archive::Zip BerkeleyDB Bit::Vector Business::UPS CCREMOTE CGI::FastTemplate CPAN::WAIT Carp::Clan Class::Accessor Clone Compress::Raw::Zlib Compress::Zlib Crypt::Blowfish Crypt::CBC Crypt::DES Crypt::DSA Crypt::ECB Crypt::HCE_SHA Crypt::OpenSSL::RSA Crypt::OpenSSL::Random Crypt::RC4 Crypt::SSLeay Cryptix DBD::ADO DBD::CSV DBD::DBD::mysql DBD::SQLite DBD::Sprite DBD::mysql DBD::mysql_9apr10 DBI DBI,owen Data::Buffer Date::Calc Date::Manip Date::Pcalc Devel::Symdump Digest Digest::HMAC Digest::MD5 Digest::SHA Digest::SHA1 Email::Simple Encode::Detect Error ExtUtils::CBuilder File::HomeDir File::NFSLock File::Remove File::Which Font::AFM FreezeThaw GD HTML-Format HTML-Tree HTML::Parser HTML::Tagset HTML::Template IO::Compress::Base IO::Compress::Zlib IO::Socket::SSL IO::Stringy IO::Zlib IP::Country Image::Magick Image::Magick_13Apr10 Image::Magick_9Apr10 Image::Size JSON JSON::XS LWP MCrypt MD5 MIME-tools MIME::Base64 MIME::Lite MIME::Types MIME::tools Mail Mail::Alias Mail::Box Mail::DKIM Mail::IMAPClient Mail::Message::Attachment::Stripper Mail::RFC822::Address Mail::SPF Mail::SPF::Query Mail::Transport::Dbx Mcrypt Module::Build Msql-Mysql-modules Net Net::CIDR Net::CIDR::Lite Net::DNS Net::DNS::Resolver::Programmable Net::IMAP::Simple Net::IP Net::SSLeay Net::Telnet NetAddr::IP OLE::Storage_Lite Object::Realize::Later PDF::API2 Params::Util Parse::Yapp Perl Pod::Coverage Pod::Escapes Pod::Simple RRDp RRDs SQL::Statement Spreadsheet::ParseExcel Storable String::Approx Sys::Hostname::Long Template Term::ReadKey Term::ReadLine Test::Pod Test::Pod::Coverage Text::CSV Text::CSV_XS Text::Glob Text::Template Tie::DBI Tie::Tools TimeDate URI Unicode::Map Unicode::String User::Identity WWW::Curl XML-DOM XML::Generator XML::NamespaceSupport XML::Parser XML::SAX XML::SAX::Expat XML::Simple XML::XQL XML::XSLT YAML common::sense libwww-perl libxml-enno libxml-perl version

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵

nkhughes
Dabbler
Posts: 21
Thanks: 2
Registered: ‎17-09-2007

Re: Perl version and modules on new CGI server?

Much appreciated Bob....modules.pl does indeed now work for me  Smiley
nkhughes
Dabbler
Posts: 21
Thanks: 2
Registered: ‎17-09-2007

Re: Perl version and modules on new CGI server?

In case it's of use to anyone, I've updated http://ccgi.nkhughes.plus.com/cgi-bin/modules.pl to show the installed module version as well.
I was going to paste the list here, but it's quite big when formatted as a table, and might annoy the moderators  Smiley
bobpullen
Community Gaffer
Community Gaffer
Posts: 16,887
Thanks: 4,979
Fixes: 316
Registered: ‎04-04-2007

Re: Perl version and modules on new CGI server?

Thanks for that Neil. I'm going to create an in-life CGI FAQ for this forum at some point so this will come in handy when I do Smiley

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵