in reply to Re^6: Cookie and Session
in thread Cookie and Session
If you copied his script and you're seeing all that in your browser, then go back to what I said above: your server is sending headers ahead of what your CGI scripts are sending (and apparently encoding your output as well). You'll have to fix that before your CGIs can work at all. Your web server shouldn't send any headers when it runs a CGI; it should let the CGI take care of that.
Try this extremely simple CGI script. If you see anything in your browser other than "Hello, world!", you have a server problem. You should NOT see the Content-type line.
#!/usr/bin/perl use warnings; use strict; print "Content-type: text/html\n\n"; print "Hello, world!";
|
|---|