HA!
I just read this: http://www.devdaily.com/perl/edu/articles/pl010015/
If you don't have root access ...
If you don't have access to the root password on your Unix server, or you're
not allowed to add Perl modules to the Perl installation directories, what can
you do? (Note: This problem usually arises when you're renting web space on
somebody else's web server, and they don't have the module installed that you
need -- a fairly common occurrence.)
In cases like this, the thing to do is to install the Perl module yourself into
a directory where you do have write permission. For instance, if my name is
George, and my HOME directory is /home/george, I might install my Perl modules
into a directory named /home/george/modules. If you follow the installation
instructions for Perl modules, this is very easy to do.
Assuming that goes okay and you now have the module installed in
/home/george/modules, how do you get your Perl/CGI programs to find the module?
Fortunately, that too is easy. All you have to do is modify your Perl/CGI
program slightly to tell the program where else it should look for modules.
Assuming that goes okay and you now have the module installed in
/home/george/modules, how do you get your Perl/CGI programs to find the module?
Fortunately, that too is easy. All you have to do is modify your Perl/CGI
program slightly to tell the program where else it should look for modules.
For instance, if the people that host my web site didn't have the CGI.pm module
available, I'd install it in /home/george/modules. Then I'd modify my Perl/CGI
program to find the module by adding this line near the top of my Perl programs:
use lib '/home/george/modules';
This simple line of code tells your Perl program to add this directory to it's
@INC search directory. @INC contains the list of directories Perl searches when
looking for modules. The use lib command is the easiest way I know to modify
@INC.
Once you've made this change, you can use your normal "use" or "require"
statements later in your program (just like you normally would).
A simple demo program
Listing 1 contains a small demo program you can use to test this process. When
you run this program from the Unix command line, it (1) uses the use lib
/home/george/modules statement to modify @INC, and then (2) prints the value of
@INC to standard output. (Note: Don't try to run this program by accessing it
from a web browser, because it won't work as written.)
#!/usr/bin/perl
use lib "/home/george/modules";
print "\...@inc is @INC\n";
Listing 1 (above): This simple demo program shows an easy way to modify Perl's
@INC variable. This lets you add your custom directories to Perl's search path,
allowing you to use Perl modules that aren't installed in "default" locations.
Conclusion
If you don't have access to the root account on your web server, or you're not
allowed to install Perl modules into the standard directories -- fear not --
you can still install Perl modules into other directories, and then access them
from your programs. Just use the use lib statement to add your search directory
to Perl's search path, and your problems will be solved!
________________________________
From: Simon Hobson <[email protected]>
To: [email protected]
Sent: Sat, January 9, 2010 12:27:37 PM
Subject: Re: [rrd-users] RRDTools Server and Installing RRDTools in a shared
hosting environment
AllSort ofQuestions wrote:
>I have two questions somehow related to each other. I asking these
>questions because apparently I can't run rrdtools in a shared hosted
>envirionmnet. (Linux-REd Hat @Godaddy www.godaddy.com)
>From what I could see they have perl available for their clients but
>only a limited set of modules, probably the most popular ones, are
>installed and you can not install your own.
You are unlikely to be able to run any software not already
supported. On a typical shared web hosting service, the server hosts
multiple sites all using a common set of software. Whilst I believe
it should be technically possible to install your own binaries in
your own storage space, in practice I would expect most shared
hosting providers to prohibit this (either in their ToS or by
technical restrictions - typically the server would be configured to
not execute binaries outside of certain system wide shared
directories) and this would impact on their more expensive services
they'd rather you buy if you want to do this.
In my limited experience, the larger the hosting company, the less
likely they are to be able to accommodate you - with only smaller
companies with manually (or semi manually) managed servers having the
capability.
Have you tried asking GoDaddy if they have a server with RRD Tools
installed that they could move your site to ?
--
Simon Hobson
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
_______________________________________________
rrd-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
__________________________________________________________________
The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo!
Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/_______________________________________________
rrd-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users