SitePoint Sponsor

User Tag List

Results 1 to 21 of 21

Thread: CGI Script?

  1. #1
    SitePoint Member
    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

  2. #2
    Serial Publisher silver trophy aspen's Avatar
    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

  3. #3
    SitePoint Member
    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

  4. #4
    mouse monkey
    Join Date
    Dec 1999
    Location
    UK
    Posts
    656
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    What FTP clients are you using as it will be much easier to give instrctions bassed on that. CuteFTP, LeechFTP, AceFTP, WS_FTP etc.?

  5. #5
    SitePoint Member
    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

  6. #6
    SitePoint Member
    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.

  7. #7
    Prolific Blogger silver trophy Technosailor's Avatar
    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
    Aaron Brazell
    Technosailor



  8. #8
    SitePoint Member
    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.

  9. #9
    SitePoint Zealot
    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.
    hello,

    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/

  10. #10
    Prolific Blogger silver trophy Technosailor's Avatar
    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
    Aaron Brazell
    Technosailor



  11. #11
    SitePoint Zealot
    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]
    scooter's host, f2s.com, doesn't require cgi scripts to be put in a cgi-bin directory; they can be placed in any directory.

    Jason Weinstein
    webmaster@MaximumEdge.com
    http://www.MaximumEdge.com/

  12. #12
    Prolific Blogger silver trophy Technosailor's Avatar
    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
    Aaron Brazell
    Technosailor



  13. #13
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.
    If the permissions are set wrong it will return a 500 error not a 403 error.

    You need to have the following line at the top of your script on f2s :

    #!/usr/bin/perl

    Sean

  14. #14
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  15. #15
    SitePoint Zealot
    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.
    i disagree. 403 errors are usually associated with an error related to the permission of a file, and a 500 error means that a server software error has occured.

    Jason Weinstein
    webmaster@MaximumEdge.com
    http://www.MaximumEdge.com/

  16. #16
    SitePoint Member
    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

  17. #17
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  18. #18
    SitePoint Zealot
    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.
    actually, the first line is '#!/usr/local/bin/perl'. take out the '/local' part and change it to '#!/usr/bin/perl'.

    Jason Weinstein
    webmaster@MaximumEdge.com
    http://www.MaximumEdge.com/

  19. #19
    SitePoint Zealot
    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
    on my server (apache running on linux) i get a 403 error when permissions aren't set right on a cgi script. i guess our servers are configured differently.

    -Jason

  20. #20
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  21. #21
    SitePoint Member
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •