in reply to Testing scripts

What editor are you using? You'll want to use an editor that saves the script in pure ASCII text; also, you'll need to upload the CGI script in ASCII mode to the cgi-bin directory.

Replies are listed 'Best First'.
Re^2: Testing scripts
by dsheroh (Monsignor) on Feb 08, 2010 at 11:10 UTC
    cgi-bin directories are not used universally. The OP may not need to put his code in one.

    To the OP: As already said, check your error logs, assuming your hosting company makes them available to you. They should contain the full details of any warnings or error messages emitted by your code.

    The 500 Internal Server Error results you're seeing most likely mean that either the server is failing to run your CGI code at all or that it exits (whether "successfully" or not) without outputting anything recognizable as HTTP headers. When you run your script on the command line, what is its output?

      Running under my windows command line on my machine my simple scripts work fine.
      However so far I have found that
      print <<"ending_print_tag";
      blaaa blaaa
      ending_print_tag
      returns a "can't fint string terminator error "ending_print_tag" anywhere before EOF"
      Any chance you would know what this means?
      BTW this is my current level, gradually improving!

        Maybe you don't have a newline after ending_print_tag? Otherwise, please show the full code that exhibits that behaviour, and please put it in between <code>...</code> tags so it renders and downloads nicely.