Welcome to WebmasterWorld Guest from 54.226.25.231

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Errors moving a perl script from one host to another

     

supermanjnk

4:37 pm on Dec 17, 2009 (gmt 0)

10+ Year Member



First off, I know pretty much nothing about perl, my background is in PHP. I understand the code well enough to know what is happening and when, but I am getting the following when I try and access the pages on the new server.

Base class package "Class::DBI::mysql" is empty.
(Perhaps you need to 'use' the module which defines that package first.)
at /SBS/DBI.pm line 6
BEGIN failed--compilation aborted at /SBS/DBI.pm line 6.
Compilation failed in require at (eval 4) line 3.
\t...propagated at /usr/lib/perl5/5.8.5/base.pm line 85.
BEGIN failed--compilation aborted at /SBS/business.pm line 2.
Compilation failed in require at business_admin.pl line 6.
BEGIN failed--compilation aborted at business_admin.pl line 6.
Premature end of script headers: business_admin.pl

Unfortunately I'm not familiar enough with perl to know what module I need to include (assume Mysql) and where I need to include it.

Any Ideas?

phranque

5:21 pm on Dec 17, 2009 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



just a guess, but perhaps you need to install Bundle::DBD::mysql [search.cpan.org]

Hissingsid

5:58 pm on Dec 22, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here's what I would do.

1. Get hold of perldiver.cgi, put it where you can run CGI scripts on the server change its permissions and navigate to it with your browser. You will get a full report of what Perl modules are available to you.

2. Look in your Perl script for "use" and "include" statements. You need to check that you have put any library files that are included in the right place and any modules are available to you.

If there is anything missing, if it is a library file find it and put it where it is meant to be, if it is a module and you are on a shared server you are probably best off asking your hosts tech guys to install it for you. If they will not it may be possible to put it in your own space and point your script at it. This sometimes works but may not.

If I am ever moving hosts (on a shared server) I always ask them if I can run Perl scripts anywhere in my space, for a list of installed Perl Modules and if I can change the executable extension in my .htaccess file. I also ask them if they are prepared to install other modules if I need them. I've not yet failed to find what I want but sometimes I have to shop around a bit.

Cheers

Sid

 

Featured Threads

Hot Threads This Week

Hot Threads This Month