Jump to content


How do I get perl scripts to run?

  • Please log in to reply
3 replies to this topic

#1 PdV


    Junior Member

  • Member
  • Pip
  • 35 posts

Posted 22 May 2008 - 06:06 PM

Hi guys,

I really don't know anything about perl, but I'm moving an old website over to US and it includes some links to perl scripts for click tracking etc., but they don't work.

I've tried placing the perl scripts in a cgi-bin folder within the site's folder, one level above the folder and also in the cgi-bin in the w\ folder, but the scripts simply don't run like they used to when they were on another host.

As an example, I have a table listing files that can be downloaded, with a counter that shows the number of downloads, and the html source is currently:

<a href="../cgi-bin/track.pl?p=/downloads/vbrun300.dll">vbrun300.dll</a>
<img src="../cgi-bin/img_counter2.pl?sc=/downloads/vbrun300.dll" width="32" height="16">

The two perl scripts track.pl and img_counter2.pl are the scripts I want invoked.

Can you tell me what, if anything I need to change to get these working, please?

Many thanks,

#2 olajideolaolorun


    Project Manager

  • Admin
  • PipPipPipPipPip
  • 2,351 posts
  • Gender:Male
  • Location:Atlanta, GA
  • SourceForge IDempirex
  • Wiki ID: olajideolaolorun
  • IRC Nickname: Olajide
  • Main OS: Windows 10

Posted 22 May 2008 - 08:18 PM

Put the scripts in the W:/cgi-bin folder. Log onto the script from http://localhost/cgi-bin/track.pl

What happens? Error?

#3 PdV


    Junior Member

  • Member
  • Pip
  • 35 posts

Posted 04 June 2008 - 07:15 AM

Hi there,

Did that and I get a 500 - internal server error.

Is it broke? :)

#4 PdV


    Junior Member

  • Member
  • Pip
  • 35 posts

Posted 04 June 2008 - 08:24 AM

S'OK - found the problem!

I had a script called test.pl which displayed a 'success!' type of message, so Perl is definately OK.

Looked at the differences between that and the script I was trying to run and found that the first line was missing '/usr' from the path.

Added that and it all works OK now.

Thanks for your help guys.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users