SitePoint Sponsor |
|
User Tag List
Results 1 to 21 of 21
Thread: CGI Script?
-
Jun 27, 2001, 13:33 #1
- Join Date
- May 2001
- Location
- Canada
- Posts
- 11
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
CGI Script?
Ok, I uploaded CGI Script to my personnel server but it doesn't open.
www.fg4e.f2s.com/help/hello.cgi
It's a test to see if CGI's work on my server. Freedom 2 Surf says it should work but it dosen't work. Anyone know whats going on?
Scooter
-
Jun 27, 2001, 14:06 #2
- Join Date
- Aug 1999
- Location
- East Lansing, MI USA
- Posts
- 12,937
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
you will need to change the permissions on it. Did you do this?
Chris Beasley - I publish content and ecommerce sites.
Featured Article: Free Comprehensive SEO Guide
My Guide to Building a Successful Website
My Blog|My Webmaster Forums
-
Jun 27, 2001, 15:13 #3
- Join Date
- May 2001
- Location
- Canada
- Posts
- 11
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
No?!
No I didn't?! How do I do it? I'm kinda new to CGI.
Scooter
-
Jun 27, 2001, 15:42 #4
- Join Date
- Dec 1999
- Location
- UK
- Posts
- 656
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
-
Jun 27, 2001, 16:41 #5
- Join Date
- May 2001
- Location
- Canada
- Posts
- 11
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Cute FTP and Leech FTP
CuteFTP and Leech FTP, I use more Leech FTP. Why?
Scooter
-
Jun 28, 2001, 07:43 #6
- Join Date
- May 2001
- Location
- Canada
- Posts
- 11
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
*Bump*
I'm sorry put this is very important.
-
Jun 28, 2001, 08:18 #7
- Join Date
- Jun 2001
- Location
- Before These Crowded Streets
- Posts
- 9,446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Use CuteFTP....sign into your directory and select the file on the remote server...right click on it...select properties. Set the permission level to 755. I am going off the top of my head. I use CuteFTP, but I'm tryign to do this by memory. Try to help me out by filling in the little blanks with what I'm saying....
That should make the user permission for you Read/Write/Execute, and everyone else, just read/Execute.
Hope this helps.
Sketch
-
Jun 28, 2001, 10:26 #8
- Join Date
- May 2001
- Location
- Canada
- Posts
- 11
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Did that!
I did that but it still don't work!
www.fg4e.f2s.com/help/hello.cgi
Or
www.fg4e.f2s.com/help/ubb_test.cgi
I opened them but they don't work here. Do they work on anyone elses pc.
Scooter
PS: It's not property its CHMOD, I think.
-
Jun 28, 2001, 10:53 #9
- Join Date
- Apr 2001
- Location
- Toronto, Ontario, Canada, Earth
- Posts
- 138
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Re: Did that!
Originally posted by The Scooter
I opened them but they don't work here. Do they work on anyone elses pc.
this is a server-side problem, so it's not going to make any difference who's computer it's viewed on. also, since it's returning an internal server error as opposed to a 403 error, it's probably not the file permissions that are causing the problem.
make sure that you uploaded the file in ascii and that it has the correct path to perl. also, if you have telnet access try running the script through telnet to see what error message is displayed.
Jason Weinstein
webmaster@MaximumEdge.com
http://www.MaximumEdge.com/
-
Jun 28, 2001, 11:04 #10
- Join Date
- Jun 2001
- Location
- Before These Crowded Streets
- Posts
- 9,446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
A couple ideas are
A) try putting the file in a cgi-bin directory. Typically the script will point there.
b) Secondly, verify that the spelling of the filename is correct, including caps. Unix files are case sensititve and chances are the server is a Unix server.
Sketch
-
Jun 28, 2001, 11:08 #11
- Join Date
- Apr 2001
- Location
- Toronto, Ontario, Canada, Earth
- Posts
- 138
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Sketch
try putting the file in a cgi-bin directory. Typically the script will point there.[/B]
Jason Weinstein
webmaster@MaximumEdge.com
http://www.MaximumEdge.com/
-
Jun 28, 2001, 11:20 #12
- Join Date
- Jun 2001
- Location
- Before These Crowded Streets
- Posts
- 9,446
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
ok, just an idea from my experience. It's not that the server requires it but if the Perl script is a canned one from somewhere, perhaps the action itself points at a cgi-bin directory. I'm shooting from the hip here.
Sketch
-
Jun 28, 2001, 11:43 #13
Re: Re: Did that!
Originally posted by maximumedge
since it's returning an internal server error as opposed to a 403 error, it's probably not the file permissions that are causing the problem.
You need to have the following line at the top of your script on f2s :
#!/usr/bin/perl
Sean
-
Jun 28, 2001, 11:45 #14
Also, just saw that permissions are set by the f2s servers so you do not have to. Change the first line as I said above and upload the file.
Sean
-
Jun 28, 2001, 12:23 #15
- Join Date
- Apr 2001
- Location
- Toronto, Ontario, Canada, Earth
- Posts
- 138
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Re: Re: Re: Did that!
Originally posted by seanf
If the permissions are set wrong it will return a 500 error not a 403 error.
Jason Weinstein
webmaster@MaximumEdge.com
http://www.MaximumEdge.com/
-
Jun 28, 2001, 12:28 #16
- Join Date
- May 2001
- Location
- Canada
- Posts
- 11
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The first line is #!usr/bin/perl. I did upload it in a acsii mode. And it still doesn't work. Here is the code of the script. It is a test to see is CGI scripts work on my server:
#!/usr/local/bin/perl
# Alert! The web server is *NOT* processing the script if you can read this line.
print "Content-type: text/html\n\n";
print "Hello world from PERL $]\n";
print "<p>.cgi scripts are mapped to Perl.";
But I guess they don't. i'll ask my friend who got his cgi scripts to work on f2s.com
Scooter
-
Jun 28, 2001, 12:30 #17
If you do not have permissions set correctly on a folder you will get a 403 error. If you do not have the permissions set correctly on a cgi script you will get a 500 error. Please try it and see
Sean
-
Jun 28, 2001, 12:32 #18
- Join Date
- Apr 2001
- Location
- Toronto, Ontario, Canada, Earth
- Posts
- 138
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by The Scooter
The first line is #!usr/bin/perl.
Jason Weinstein
webmaster@MaximumEdge.com
http://www.MaximumEdge.com/
-
Jun 28, 2001, 12:37 #19
- Join Date
- Apr 2001
- Location
- Toronto, Ontario, Canada, Earth
- Posts
- 138
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by seanf
If you do not have permissions set correctly on a folder you will get a 403 error. If you do not have the permissions set correctly on a cgi script you will get a 500 error. Please try it and see
Sean
-Jason
-
Jun 28, 2001, 12:44 #20
Oh right. I was only defending my point so strongly because every server I have used has done it the way I said and I have never heard of a server giving 403 errors for wrong file permissions.
You learn something new every day
Sean
-
Jun 28, 2001, 18:37 #21
- Join Date
- May 2001
- Location
- Canada
- Posts
- 11
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Eureka!
It works. Try it out.
www.fg4e.f2s.com/hello.cgi
I might of deleted it. Thanx for your help everyone.
Scooter
Bookmarks