Click to See Complete Forum and Search --> : Installing a script on webhost


sftrprod
09-19-2007, 11:07 AM
Hi,

I found this module:
http://search.cpan.org/~bricas/WWW-Wikipedia-1.92/lib/WWW/Wikipedia.pm

I want to use it to retrieve Wikipedia articles and show them on my website. However, I have absolutely not idea about anything to do with PERL and would like to know how to install this module to my webhost account.

I have an account with www.freehostia.com

It says that PERL is enabled and the FAQ says this about PERL:

Can I use custom PHP and CGI (Perl) scripts?

Yes, you are allowed to use .cgi and .pl files in your account.
The Perl scripts do not require a special /cgi-bin/ directory. You can place Perl and PHP scripts into any directory you wish.

The path to the Perl directory is /usr/bin/perl
The path to the Sendmail directory is: /usr/sbin/sendmail

The required permissions are as follows:
PHP scripts - chmod 755 filename.php
Perl scripts - chmod 755 filemane.cgi

I do not have shell access. Can anybody give me any idea (in idiot terminology) how to install this module?

Thanks a lot. It will be very useful to me.

PolyGreat
09-22-2007, 08:45 PM
Without shell access, you will have no way of installing a .pm file. If it were a .pl file, you could easily upload it to the cgi directory for your account, set its permissions, and you'd be ready to go. However, .pm modules must be added to perl, usually through root access on the server, using a shell command such as "make" to update the modules, the list for which is contained in perl's @inc variable. See the following website for more information about how this is _usually_ done.

http://www.cpan.org/modules/INSTALL.html

Depending on whether or not your desired module is already unpacked and ready to use, however, you may find an acceptable solution from this website:

http://www.devdaily.com/perl/edu/articles/pl010015/

Unfortunately, without shell or root access, beyond this your options are rather limited. You can ask the hosting company to add the module for you, and they may or may not choose to do so. I have seen my web host do it for me before, so it yours may also be considerate and flexible enough to add the module you require.

Nedals
09-30-2007, 12:21 AM
Without shell access, you will have no way of installing a .pm file.
Not quite true...
You can install a module without shell access.

Create a non-web accessible directory (above webroot)
Upload the source code of the module into that directory.
Start your program with the following...

#!/usr/bin/perl

use strict;
use lib '/full/path/to/directory';
use theModule;
....

This will work providing there is no complied code in the module.