Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"save to disk" box pops up instead of running the script...why? 2

Status
Not open for further replies.

TulsaJeff

Programmer
Joined
Jan 29, 2001
Messages
870
Location
US
I have a survey I am trying to setup for a local church site and have gotten everything uploaded as instructed. However when I hit the submit button on the form...instead of activating the script and showing the results, it merely tries to download the script as if it was an exe file or something.

I have other perl scripts that run fine and never had any trouble at all in the past. What could be some possible problems here?

btw...the permission on the perl script file is set to 755 which is what it supposed to be according to the instructions. Ya' Gotta Love It!
sleepyangelsBW.jpg
 
probably an improper header is being sent by the script. make sure that the first thing that is printed is "Content-type text/html\n\n". it also might be a minor misconfiguration in the webserver. do other scripts work inside the same directory as the script you're having problems with? "If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."
 
thanks for the post....I do have other scripts in that exact directory that are not working.... however there are scripts in other directories under the same domain that are working fine.

It seems to be that directory only. I did check the first print function and it is as follows:

print "Content-type: text/html\n"; Ya' Gotta Love It!
sleepyangelsBW.jpg
 
Hi. I had this problem for a moment, too. It seems as though your web server doesn't know that there are scripts in that directory, so it doesn't know to run them. Since you have other scripts running correctly, I assume your server knows how to execute Perl.
In Apache, you just need to add that directory to your script aliases in httpd.conf. For other than Apache, someone else will probably post a solution on how to do this. Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com
 
I think the first header has to have an extra newline:
print "Content-type: text/html\n\n";

Alternatively, if your new directory isn't a directory within your cgi-bin, then the script definately won't work (despite it's permissions) unless you add another ScriptAlias in your apache config, as mentioned above.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top