homepage Welcome to WebmasterWorld Guest from 54.145.183.190
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
Errors moving a perl script from one host to another
supermanjnk

10+ Year Member



 
Msg#: 4044873 posted 4:37 pm on Dec 17, 2009 (gmt 0)

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

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



 
Msg#: 4044873 posted 5:21 pm on Dec 17, 2009 (gmt 0)

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

Hissingsid

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4044873 posted 5:58 pm on Dec 22, 2009 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved