Renaming a CGI file/script

Discussion in 'Programming' started by walesalex, Dec 23, 2006.

  1. #1
    Ok so I've downloaded CGI Proxy and I need to rename the file so that the word proxy is in it but whatever I rename it to it won't work, it comes up with an internal server error. :(

    It's not that I can't install it or anything, I can get it to work perfectly as it comes, but just renaming it from nph-proxy.cgi to nph.cgi and it buggers up.

    http://www.jmarshall.com/tools/cgiproxy/cgiproxy-beta.html is the script if that helps you.
     
    walesalex, Dec 23, 2006 IP
  2. JEET

    JEET Notable Member

    Messages:
    3,832
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #2
    I haven't used this script, but I think if other files are using output from this file, some functions may be, then you will have to change the filename used in other files as well.

    example if j1.cgi calls a function placed in your nph-proxy.cgi, and you rename that file to something else, then you will have to modify the j1.cgi as well to look for the right file.
    Bye :)
     
    JEET, Dec 23, 2006 IP
  3. walesalex

    walesalex Peon

    Messages:
    552
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This is the only file though. :(
     
    walesalex, Dec 23, 2006 IP
  4. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #4
    you gotta leave nph- at the beginning of the filename else the script won't work.
     
    krakjoe, Dec 23, 2006 IP
  5. walesalex

    walesalex Peon

    Messages:
    552
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ah right, thanks - works perfectly leaving that in. :)

    Any reason for that being the case? :S
     
    walesalex, Dec 24, 2006 IP
  6. krakjoe

    krakjoe Well-Known Member

    Messages:
    1,795
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    135
    #6
    somethin to do with perl headers being sent to browsers, not exactly sure, it's been that way for years, there are certain scripts that need to be named in this way on every server they run on....
     
    krakjoe, Dec 24, 2006 IP
  7. walesalex

    walesalex Peon

    Messages:
    552
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Ah right thanks. I don't know a single thing about CGI as you can probably tell, and my school blocks the word proxy in URLs so it was a pain. :p
     
    walesalex, Dec 24, 2006 IP
    crazyryan likes this.