CGI won't run, it wants to download

 
Post new topic   Reply to topic    Aprelium Forum Index -> Perl
View previous topic :: View next topic  
Author Message
equinox_black
-


Joined: 18 Aug 2005
Posts: 30

PostPosted: Mon May 29, 2006 5:11 pm    Post subject: CGI won't run, it wants to download Reply with quote

new site on a new computer. the host root is set up to the directory where the site resides.... when i press submit on the form it wants do download the .cgi file instead of running it....

would it help if i mentioned that i have uninstalled and reinstalled abyss and active perl multiple times.... and i've followed the script setup instructions to a T?

oh yeah... btw.... the scripts path.... what path is it??? it wont let me change it to anything else
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue May 30, 2006 10:47 am    Post subject: Re: CGI won't run, it wants to download Reply with quote

equinox_black,

Can you give us an example or two of URLs (even local ones) that do not behave correctly (download instead of execute)?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
pkSML
-


Joined: 29 May 2006
Posts: 873
Location: Michigan, USA

PostPosted: Thu Jun 01, 2006 10:50 pm    Post subject: CGI won't run, it wants to download Reply with quote

I have seen this problem before.

Abyss must be set up to handle CGI scripts with the Perl interpreter. Otherwise, CGI files might as well be TXT files and they will be downloaded.

To set up Abyss to use Perl, the directions are listed at http://aprelium.com/abyssws/perl.html.

If you've cleared this hurdle already, please list your Abyss version, your operating system, and what is listed on the Script Paths dialog box.

I could help you much more personally if you send me a copy of your abyss.conf file via email to pksml@netscape.net.

-Stephen
_________________
Stephen
Need a LitlURL?


http://CodeBin.yi.org
Back to top View user's profile Send private message Visit poster's website
cwoodman
-


Joined: 10 Aug 2006
Posts: 4

PostPosted: Thu Aug 10, 2006 10:25 pm    Post subject: Downloading instead of running script Reply with quote

I'm having the same problem with my first attempt at running a cgi script with Abyss.

My html file has a form with the first line:
<form action="cgi-bin/cc.cgi" method="post">

The first line of the cc.cgi file is:
#!C:\Perl\bin\perl.exe

When I submit the form, I get the text of the cgi file instead of executing it.

Any help would be much appreciated!
Back to top View user's profile Send private message
pkSML
-


Joined: 29 May 2006
Posts: 873
Location: Michigan, USA

PostPosted: Thu Aug 10, 2006 10:34 pm    Post subject: Reply with quote

Please post the results of the downloaded file.

I still believe you don't have the interpreter installed in Abyss. It is OK to have the shebang line in your Perl code (although it is not necessary in Windows), but you MUST declare the interpreter in Abyss, or Abyss doesn't know to run perl.exe to run your script.

Again, the instructions to set up the interpreter are found at http://aprelium.com/abyssws/perl.html. If you want more explicit instructions (with pictures :), see http://abyssunderground.co.uk/tutorials-perl.php.
_________________
Stephen
Need a LitlURL?


http://CodeBin.yi.org
Back to top View user's profile Send private message Visit poster's website
cwoodman
-


Joined: 10 Aug 2006
Posts: 4

PostPosted: Thu Aug 10, 2006 10:54 pm    Post subject: Scripting setup... Reply with quote

Hi Stephen,
There's a screen shot of the host sripting setup parameters at
http://www.soapmaker.ca/pics/HostSetup.gif

I've gone through the instructions several times, and can't see anything wrong with it.

Not sure what you mean by the results... it's just the text listing of my script.
Do you want to see this?
Back to top View user's profile Send private message
pkSML
-


Joined: 29 May 2006
Posts: 873
Location: Michigan, USA

PostPosted: Fri Aug 11, 2006 12:42 am    Post subject: Reply with quote

Hmmm...

Try renaming your .cgi file to .pl. (.pl files will still work with Perl) See if that makes a difference. If so, I think the reason is tied to seeing *.cgi listed twice in your script paths. You should delete the one with the trash can icon next to it.

And go ahead and post the output of the script if you want to. Any details you can provide could help solve the problem. A screenshot of the output in your browser would be helpful also.
_________________
Stephen
Need a LitlURL?


http://CodeBin.yi.org
Back to top View user's profile Send private message Visit poster's website
cwoodman
-


Joined: 10 Aug 2006
Posts: 4

PostPosted: Fri Aug 11, 2006 1:59 am    Post subject: Output Reply with quote

Edited to remove unnecessary text. Please see next post entitled "Stupid me".

Thanks,
Crawford


Last edited by cwoodman on Fri Aug 11, 2006 3:08 am; edited 1 time in total
Back to top View user's profile Send private message
cwoodman
-


Joined: 10 Aug 2006
Posts: 4

PostPosted: Fri Aug 11, 2006 3:04 am    Post subject: Stupid me! Reply with quote

I just figured it out...
The reason the script wasn't running is because I wasn't going through the server!!!
Forgot to include "http://localhost/testSite" in the url string.

Sorry for bothering you. :oops:

Crawford
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Perl 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