Welcome to Dream.In.Code
Getting Help is Easy!

Join 86,267 Programmers. There are 1,886 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

Installing a Script

 
Reply to this topicStart new topic

Installing a Script, In Perl

brandon99337
post 7 May, 2008 - 12:20 PM
Post #1


D.I.C Head

**
Joined: 14 Feb, 2008
Posts: 65



I have no idea about anything with perl but this script seemed very interesting.

Hosted on 1 free site it looks like this...

Working Host

But on the others it looks like this (view attachment errorpage)

It's the exact same code (view attachment auctionweaver1)

What's wrong?


Attached File(s)
Attached File  errorpage.htm ( 98.07k ) Number of downloads: 14
Attached File  auctionweaver1.txt ( 103.83k ) Number of downloads: 10
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


girasquid
post 7 May, 2008 - 12:48 PM
Post #2


Barbarbar

Group Icon
Joined: 3 Oct, 2006
Posts: 953

I can't seem to see an error message - just an .htm file.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Petebardo
post 7 May, 2008 - 12:58 PM
Post #3


New D.I.C Head

*
Joined: 14 Dec, 2006
Posts: 12

From the appearance of the two attached files, Perl is not installed (or not installed correctly) on those two servers. The one with the htm extension is probably a Windows server. It's hard to tell about the other.

The two servers are returning the Perl script itself instead of processing the script.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

girasquid
post 7 May, 2008 - 01:18 PM
Post #4


Barbarbar

Group Icon
Joined: 3 Oct, 2006
Posts: 953

Ooooh - so errorpage.htm is the actual output of your page.

Is it a windows server? Does it have Perl installed, and is the .cgi or .pl(whichever the script has) set up properly to run via the Perl compiler?

The second case is not having the proper handler within the Apache configuration(if it's an Apache system), which is why it's sending the script as plaintext. You need to add this line to .htaccess:
CODE

AddHandler cgi-script .cgi
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

brandon99337
post 7 May, 2008 - 01:45 PM
Post #5


D.I.C Head

**
Joined: 14 Feb, 2008
Posts: 65

Well do you know any free hosting that provides it already installed?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

girasquid
post 7 May, 2008 - 04:45 PM
Post #6


Barbarbar

Group Icon
Joined: 3 Oct, 2006
Posts: 953

I generally don't use free hosting, as I host all my projects myself.

You might want to try contacting the hosting company, and asking if Perl is installed or not - if it's not, try seeing if they'll install it for you - sometimes all you need to do is ask.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

mocker
post 7 May, 2008 - 08:20 PM
Post #7


D.I.C Head

**
Joined: 14 Oct, 2007
Posts: 73

Have you tried simply renaming your page to end with .pl or .cgi ? Almost all free hosts have perl installed, but it won't know to use perl for your page unless you use those extensions, or edit your .htaccess

The line girasquid wrote:
CODE

AddHandler cgi-script .cgi

associates files ending with .cgi . If you want all your .htm files to be parsed as cgi (the most common way for perl to work) then it would be
CODE

AddHandler cgi-script .htm

This is hardly ever done though since all htm files will need to be programs or they won't process correctly.

If you are on a linux host, those lines just go in your .htaccess file in your main directory
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 5/16/08 10:27AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month