Results 1 to 8 of 8

Thread: testing cgi scripts locally - Urgent need of help!

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2001
    Posts
    37

    Unhappy testing cgi scripts locally - Urgent need of help!

    Will it not be possible for me to test my cgi scripts locally without using a server? I tried running my cgi scripts using Apache HTTP server. It's giving me problems when I reconfigure the httpd file since I still have to sort of set permissions so that my cgi programs could be executed.

    Also, how come when I click on the submit button on my index.htm file, the code of the entire .cgi file appears instead of executing the cgi code? (this is when I explicitly type the path of my index.htm file at the address bar of IE).
    Last edited by val04; Jul 15th, 2001 at 09:30 AM.

  2. #2
    scoutt
    Guest
    you know I like coming here to help but it is people like you that make it hard for me. I have answered a number of you questions (4 or 5 to be exact) and I don't even get a thank you or ya it worked out of you. it is just common courtesy.

    so tell me why I should answer this one too.

    and yes you have to have a server but I know why you are getting the script code instead of it working.

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2001
    Posts
    37

    sorry

    sorry for asking the same question again and thank you for your earlier advice of using apache server even if i can't get it to run my cgi scripts.

  4. #4
    scoutt
    Guest
    thanks, next time make sure you answer you're own posts so we know that the advice we gave worked. nothing worse than handing out bad advice to everybody. I wrote this up for you and if it don't work let me know.

    ok first you have to have the shebang line in your code. that is the first line in the file
    eg #!c:/perl/perl this points to where you installed your perl

    then you have to edit your httpd to run them. find this line
    <Directory "C:/Program Files/Apache Group/Apache/htdocs/cgi-bin">
    and point it to your directory you want to run cgi in. it will only run in this directory.

    next find this line

    # To use CGI scripts:

    and change this line to so

    AddHandler cgi-script .cgi .pl // you may have to uncomment it. just delete #

    that should be it so let me know if this works

  5. #5
    scoutt
    Guest
    hey val04

    did it work or you ignoring again until you have another question

  6. #6

    Thread Starter
    Member
    Join Date
    Mar 2001
    Posts
    37

    Smile

    hey scoutt. Sorry for my delayed response. I just found out now that you actually replied to my question regarding testing cgi scripts when I viewed the responses to the latest thread I posted. I was waiting for an email to notify me if somebody replied but unfortunately, I did not receive an email notification at all.

    I'll inform you if I am able to get my Apache server to work. Thanks again for all the advice! I really do appreciate them

  7. #7

    Thread Starter
    Member
    Join Date
    Mar 2001
    Posts
    37
    I carefully followed your instructions but I still can't get it to work. I'm not sure if I edited the proper line of code. I attached a zipped copy of my httpd file just in case you want to see it.

    I think the problem has something to do with ExecCGI because every time I view the error log, the message is, "Options ExecCGI is off in this directory c:/"Program Files/Apache Group/Apache/realdocs/testform.cgi"

    Anyway, thanks for the advice.

  8. #8

    Thread Starter
    Member
    Join Date
    Mar 2001
    Posts
    37
    thanks for the advice. i think the url you gave me would be of big help!

Posting Permissions

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



Click Here to Expand Forum to Full Width