in reply to Re: Testing scripts
in thread Testing scripts

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?

Replies are listed 'Best First'.
Re^3: Testing scripts
by zealf (Novice) on Feb 12, 2010 at 14:31 UTC
    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.

        Ok, thanks for your prompt reply here.
        Any ideas?
        #!/usr/local/bin/perl print"Content-type:text/html\n\n"; print<<"ending_print_tag"; <html> <head> <title>My first CGI</title> <background="#oooooo" text='#FF0000"> </head> <body> <h1>My First CGI</h1> <em>HELLO, INTERNET!</em> <hr noshade> Watch our cyber space, another programmer is on the loose ;-) </body> </html> ending_print_tag