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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

execute script from browser

Status
Not open for further replies.

Hondy

Technical User
Mar 3, 2003
864
GB
Sorry for so many posts in one day!

I have a web page with a link to my scripts, one works and runs the script, the other tries to download through my browser. Whats with that?

I'm guessing that one script has execute permissions and the other doesn't but I have checked the permissions and they both have execute permissions. What is the difference in the way it handles the 2 scripts? (they are both in the same place and have the same permissions)

Thank you all again!
 
I'm guessing that one script has the proper perl information at the top and the other doesn't?
 
nerbonne, you were almost right. I discovered that in the Apache logs the shell script was giving a bad header.

I chopped the contents of the file in and put it into a new file and it worked, god knows why but it did.

thedaver, hmm not sure! I thought #!/bin/sh shell scripts would fall in the linux arena is there another one I should be using for scripts?

Cheers
 
Maybe you had extra whitespace at the top before the script? I know in php that if you have any whitespace before your first <?php tag that your going to be in trouble.
 
Hondy,
You never said WHAT kind of "scripts", that's my point. There are lots of kinds of "scripts", their debugging depends as much on the web server as the script itself. Just a friendly hint on asking better questions.

D.E.R. Management - IT Project Management Consulting
 
thedaver, ah you are correct, I did a few posts but this one doesn't mention SH scripts - aren't you psychic? :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top