My browser downloads the cgi files instead of viewing them?

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


Joined: 08 Mar 2003
Posts: 2

PostPosted: Sat Mar 08, 2003 3:25 am    Post subject: My browser downloads the cgi files instead of viewing them? Reply with quote

Hey - I've searched for anything similar to this but no results. When I go into localhost\cgi-bin\ everything is fine, I see a list of all my files in it. However, if I try to access any of the *.cgi files, my browser tries to download the files not view or execute them. In my cgi file, I have the perl line correct, and I use this line as well to make sure it treats it as a HTML document:

print "Content-type: text/html\n\n"; # Tells the browser that this is an
# HTML document

But still my browser will not execute or view my files, it just tries to download them. Any help would be appreciated thanks!

Also one last question, on a unix server when transferring files you can specify binary or ascii, how can I make sure it uses ascii on my server?
Back to top View user's profile Send private message Send e-mail MSN Messenger
Vader_
-


Joined: 02 Mar 2003
Posts: 26

PostPosted: Sat Mar 08, 2003 11:25 pm    Post subject: CGI excecution... Reply with quote

In order to be able excecute cgi and pl scripts, you must have Perl interpreter installed. :wink:
Otherwise, scripts will be treated as text. Follow this link:

http://www.aprelium.com/abyssws/perl.html

to see how to install Perl and make Abyss work with it... :idea:

As for the ascii/binary mode, most common FTP clients work fine if you set the type to auto. If you still want to check, go to the client's options. You should see it there.
_________________
Simple...fast...free.....
Back to top View user's profile Send private message Send e-mail Visit poster's website
rice_krispie
-


Joined: 08 Mar 2003
Posts: 2

PostPosted: Mon Mar 10, 2003 11:13 am    Post subject: yah but i did that already... Reply with quote

Sorry I didn't mention this in my previous post, but I have ActiveState ActivePerl 5.8 installed and I execute *.pl files fine. But I still have cgi problems. I also have PHP installed and those work fine as well. Any other suggestions :?:
Back to top View user's profile Send private message Send e-mail MSN Messenger
Dave
-


Joined: 11 Feb 2003
Posts: 184
Location: United Kingdom

PostPosted: Mon Mar 10, 2003 4:47 pm    Post subject: Reply with quote

you'll need to map the "cgi" extension to the Perl executable.
_________________
Any information contained herein is provided in "as is" condition without any guarantee for its accuracy, contains no warrantees - express or implied - and confers no rights.
X1 1.1.4: http://www.aprelium.com/news/abwsx1u1.html
Back to top View user's profile Send private message Visit poster's website
Vader_
-


Joined: 02 Mar 2003
Posts: 26

PostPosted: Tue Mar 11, 2003 12:30 pm    Post subject: CGI... Reply with quote

then you should do what Dave said.
Map the *.cgi extension under ther associated ext. of the perl interpreter.
_________________
Simple...fast...free.....
Back to top View user's profile Send private message Send e-mail Visit poster's website
Dave
-


Joined: 11 Feb 2003
Posts: 184
Location: United Kingdom

PostPosted: Tue Mar 11, 2003 5:46 pm    Post subject: Reply with quote

Dont't worry, the guy contacted me on MSN last night and I set it all up for him...
_________________
Any information contained herein is provided in "as is" condition without any guarantee for its accuracy, contains no warrantees - express or implied - and confers no rights.
X1 1.1.4: http://www.aprelium.com/news/abwsx1u1.html
Back to top View user's profile Send private message Visit poster's website
boxer
-


Joined: 27 Jun 2003
Posts: 2

PostPosted: Mon Jul 28, 2003 1:23 am    Post subject: Reply with quote

:cry: well how did you set it up, the public want's to know....
Back to top View user's profile Send private message
boxer
-


Joined: 27 Jun 2003
Posts: 2

PostPosted: Mon Jul 28, 2003 1:27 am    Post subject: Reply with quote

have the same problem with exec file, I get a Files Download dialog box asking me if I want to view the file or download it....
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Mon Jul 28, 2003 6:41 pm    Post subject: Reply with quote

boxer wrote:
have the same problem with exec file, I get a Files Download dialog box asking me if I want to view the file or download it....

boxer, do you have a CGI Executable (.exe file) and want it to be executed instead of being downloaded? If so, we recommend using Abyss Web Server version 1.1.6 (the latest) and adding in the CGI Paths table the virtual directory where the .exe file is located. You can also add / to that table; in such a case, all the .exe in your web site will be considered as CGI executables.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
netro
-


Joined: 09 Aug 2003
Posts: 8

PostPosted: Sun Aug 10, 2003 6:37 pm    Post subject: Reply with quote

are you using a http to locate te file or a c: use the http
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