Apache Web-Serving with Mac OS X: Part 2
Subject:   My cgi's don't work!
Date:   2002-01-31 14:37:30
From:   morbus
Response to: My cgi's don't work!

That could be a ton of things, none of which is related to your Apache setup, or your CGI configuration. This filename.cgi script could have incorrect newline encoding, could not output the proper Content-type header, could have invalid syntax, or any of a number of other things.

I'd have to see the script itself to give you more information. How did you make the script?

Full Threads Oldest First

Showing messages 1 through 4 of 4.

  • My cgi's don't work!
    2002-01-31 17:20:02  haymaker [View]

    I downloaded it from one of those websites that have free cgi scripts for download. I just wanted to see if my cgi-bin was working correctly. The test-cgi works okay, but so far, nothing that I put in there with a .cgi or .pl works. Which brings up another question - why doesn't the test-cgi have a file extension? Should I be taking the file extensions off the other files?
    • My cgi's don't work!
      2002-05-29 13:04:11  emc^2 [View]

      I have the same msg and I can't fix it. Could you tell me how you did?
    • Morbus Iff photo My cgi's don't work!
      2002-02-01 07:08:58  Morbus Iff | O'Reilly Author [View]

      haymaker, your best bet is to start looking around for CGI FAQs, and "common things that can go wrong". Your Apache CGI configuration is working correctly, since the test-cgi runs correctly. In this case, file extensions don't matter. You're probably running into one of the problems I described in my previous post.

      A quick way to test if a script has the right line encoding, for example, is to open the script up in the terminal, and see what you see. If you do:

      less filename.cgi

      And see everything on one line, or else a lot of ^M's all over the place, then you've got incorrect line feeds that will need to be converted to Unix ones.
      • My cgi's don't work!
        2002-02-01 09:12:24  haymaker [View]

        Thnaks for your help. And thanks for the series! This is the best OS X related information I've found!