Missing modules problem on host
Posted by meanroy (meanroy), 26 October 2005Hi Ellis and all,
I've been successful at getting a rather primitive AntiSpamBot running on my home system, both as command line and as a cgi in Windows 2K using the abyss personal web server. It runs under Ubuntu Linux as well, by changing the path slashes from backslash. So far all good. It keeps the Wiki fairly clean.
I have set up a scheduled task under Win2K which runs in the background. (kudos to me for figuring THAT arcane crap out!)
This has meant that I have to keep my home machine "always on".
My next task was to install it on my web host, eventually setting it up as a cron job.
Therein lies the rub!
I got a "fatal server error", since I couldn't find the server error logs(??), I logged in with SSH and ran it as a command line.
I find that my host does not have HTML/Form.pm. (Doesn't have warnings.pm either, but I can live without that)
At this point I ran PerlDigger.pl.
Note that this is what I have been using.
use warnings; <- not installed
require HTML::Form; <- not installed
use CGI::Carp qw(fatalsToBrowser);
I then tried to use cpan and install the missing modules, as expected, this didn't work.
mkdir /home/support/.cpan: Permission denied at /usr/lib/perl5/5.00503/CPAN.pm
What do you think would be the best way to get around this?
1.) I may be able to install the modules locally. This is somewhat problematic, I had a hard time (failed) compiling modules on Ubuntu, and I have root there. Had to use Synaptic.
2.) Do you think I can do the Form stuff another way? Without using the module? After all, this is Perl, Perl motto is "There is more than one way to do it". LWP::Bundle is installed.
3.) Do you think I should be able to write something which will interact with the Form using what's installed? Here's a link to PerlDigger on my site. (not sure how safe this is, I'll remove it later)
4.) Any other solutions that come to mind?
Posted by admin (Graham Ellis), 27 October 2005on 10/26/05 at 22:12:12, meanroy wrote:
1. There's an option on module installs to let you put them into your own directory area if you don't have root access. See the Cpan FAQ and look at LIB and PREFIX.
2. Personally, I simply code my forms directly in Perl and don't use modules such as HTML::Form ... personally, it seems a lot of bother to install it when it's not needed
3. Yes, I would; see answer 2
4. See answer 2 again. You should be able to do it without a lot of code and with very little hassle. I note from your PerlDigger link that you've got what is now an old version of Perl running, so you're likely to have to find and install old archive modules. Looks like a lot of effort for something you probably don't need!
Posted by meanroy (meanroy), 27 October 2005on 10/27/05 at 04:02:01, Graham Ellis wrote:
Very good indeed!
However, I suspect you'll be hearing from me again.
I appreciate the quick response, thats just the kind of encouragement I need. As you may recall, I haven't been coding Perl very long, so I somewhat lack confidence.
Just knowing it can be done makes it easier.
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: email@example.com • WEB: http://www.wellho.net • SKYPE: wellho