CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Use GD library

 



mmcw
User

Dec 5, 2000, 5:50 AM

Post #1 of 5 (672 views)
Use GD library Can't Post

I want to use the GD library, but it is not installed on the server I use.
I can not install the modules myself. Is it possible to install or make it work on my site local. If yes could you tell me how to make it work!


rGeoffrey
User / Moderator

Dec 6, 2000, 7:40 AM

Post #2 of 5 (672 views)
Re: Use GD library [In reply to] Can't Post

You can make your own personal directory to hold perl modules.

On my server scripts have to live in the 'virtual_html/cgi-local' directory, so inside that directory I created 'lib' to hold my modules.

Then near the top of every script I include this line...

<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>


use lib ("$ENV{DOCUMENT_ROOT}/cgi-local/lib");
</pre><HR></BLOCKQUOTE>

You can hardcode the path name, but I have a similar arrangement on 5 diffrent servers so I use $ENV{DOCUMENT_ROOT} to allow the script to work unaltered on each server.

The down side of my shortcut is that you can not run it from the command line because the server has not filled %ENV. But this can be overcome using the -I modifier...

<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>


perl -I/home/me/virtual_html/cgi-local script.pl
</pre><HR></BLOCKQUOTE>



mmcw
User

Dec 6, 2000, 8:44 AM

Post #3 of 5 (672 views)
Re: Use GD library [In reply to] Can't Post

Looks nice.
But how to go on with the GD module.
Do I have to isnatll that module in thta directory. If so how to do that. I have never done something like that!!


Aquilo
journeyman

Dec 6, 2000, 9:24 AM

Post #4 of 5 (672 views)
Re: Use GD library [In reply to] Can't Post

Can I use
<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>


use lib ("$ENV{DOCUMENT_ROOT}/cgi-local/lib");
</pre><HR></BLOCKQUOTE>

for the WHOIS module?

If I can Can anyone let me know where I can get the WHOIS module!

Thank you!!


rGeoffrey
User / Moderator

Dec 6, 2000, 11:57 AM

Post #5 of 5 (672 views)
Re: Use GD library [In reply to] Can't Post

A search of CPAN shows whois can be found...
http://search.cpan.org/search?dist=Net-Whois

When installing a module I usually go collect the tarball from CPAN and open it up to see what is in it...

gzip -dc filename_here | tar xvf -

And then copy the actual *.pm files into the library directory.

There is a CPAN module that can do some of this for you, but I am too lazy to learn how to use it and too paranoid to believe that it won't break something.

PS. Remember that after GD version 1.19 it will not support gifs. So if you are using old programs and ignoring the Unisys lawsuits you will need to get an old version to install.

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives