Someone please help with my random image script.

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
cowbell
-


Joined: 14 Oct 2004
Posts: 4

PostPosted: Thu Oct 21, 2004 7:59 am    Post subject: Someone please help with my random image script. Reply with quote

I am trying to use a random image script from here. It's cool because you do not need to create a list of images, just point the cgi to a directory!

The cgi contains
Code:
#################
# Configuration #

#################

# absolute path to your starting point only directories below this can be used
my $base_path = "/path/to/your/images/";

# base URL to your images. DON'T put the trailing "/"
my $image_url = "/images";


and the html files needs
Code:
<img src="http://www.your.domain/your/path/to/script/random_image.cgi?path=directory_path" alt="some alternate text">


My cgi and html files are contained in the htdocs directory and my images are in www.mysite.com/folderblog/images.

So
1) What should my cgi file path say?
2) What should my html link be?
3) Do I need ActivePerl installed?

Thank you very much for any help.
Back to top View user's profile Send private message
Anonymoose
-


Joined: 09 Sep 2003
Posts: 2192

PostPosted: Thu Oct 21, 2004 11:51 am    Post subject: Reply with quote

1) It's the absolute path to your images, so the path you put here is the path... to your image directory! Big suprise there. Only you know where your image directory is so how can we answer this ?

eg. my $base_path = "D:/my documents/images/";

$image_url is the base URL on your webserver to reach the same directory.

eg. my $image_url = "http://www.idontbothertoreadinstructions.com/images/"
or "/images";

2) For the html code, change directory_path to the path to the directory which you want the images displayed from. Another big suprise.

3) It says on the page it is a Perl script which works with Perl or ActivePerl. I'll give you two guesses whether you need some kind of Perl interpreter installed, and the first one doesn't count.

If you answered "Gee, maybe I need Perl", zing, collect $200, pass go.

This was all on exactly the same site you just linked to under Configuration. There's even a demo on there! Just goes to show, you can give people free stuff but you'll never get them to read the ReadMe.
Back to top View user's profile Send private message
cowbell
-


Joined: 14 Oct 2004
Posts: 4

PostPosted: Thu Oct 21, 2004 4:22 pm    Post subject: Reply with quote

Dear Anonymoose,
I thank you for your help. I really do.
But you have to do something about your attitude. You are obviously well-experienced and more computer savvy than me, but you remind me of Jimmy Fallon's character on Saturday Night Live: the tech guy who uses every opportunity to make fun of others.
I did read the readme, I did try everything they said. It didn't work for me, which is obviously why I posted here. Please don't assume people post here because they are too lazy to look for answers themselves.
1) You should know where the image directory is because I told you in my original post.
2) I didn't know if the path needs htdocs or not, because it wasn't working.
3) Not being as savvy as you, I don't know if Windows has a built-in Perl system or not, which is why I asked if one must be added.

Anyway, thank you for your help. I'll give it another go.
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group