Like gellyfish, I'm confused by what a "CGI editor" might be, but I can have a guess at what your problem is.
Either your program isn't outputting the correct CGI headers (you need to, at least, print a Content-type header - use the header method from CGI.pm) or there is an error in your program and it's outputting an error message before it gets to output the headers. In this case, the real error will almost certainly be in your web server error log.
Also see Suffering from Buffering.
--
< http://dave.org.uk>
"The first rule of Perl club is you do not talk about
Perl club." -- Chip Salzenberg
| [reply] |
As gellyfish mentioned, there's a lack of data that can really help you. I would first off recommend you take a look at the links offered at Intro to the Monastery to get an idea of the best way to ask for help. It's not 'cause we're snobbish, but simply so that folks don't have to spend time doing what I'm about to do in the next paragraph: Guess at Your Situation. Plus, you don't have to play "guess what we need" quite so much, so you and we all win! So, the questions/comments:
- If you're not, Use CGI.pm. REALLY.
- What is the name of your editing program?
- What OS and Web Server are you using?
- Are you sending a header with your code? (CGI.pm makes sending headers dead easy!)
- Have you the correct permissions for the code?
That error tends to come with bad, or no, headers being sent with your program. And that's one of many possible issues. You might want to also Google for that error; it's a very common one that has little, sometimes, to do with Perl, and a lot to do with how your Web Server serves up CGI (which is lanaguage-neutral).
Finally, a few (thousand) words from Ovid:
Does any of this help?
----Asim, known to some as Woodrow.
| [reply] |
Thanks for the guidance. It does help. I realize my question was vague and rather "amateurish". I was in too much of a hurry.
Thanks,
| [reply] |
| [reply] |
CGI development requires that the first thing that your script prints be a properly formatted header so the browser can figure out what kind of an object it is. Generally if you're using CGI, this means that you should "print header;" as early in the program as possible.
This kind of error is usually caused by your script abnormally ending, often because of a file permissions error or some difference between the command-line and web environments. The following code, placed at the top of your script, will help:
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
use strict;
print header;
No good deed goes unpunished. -- (attributed to) Oscar Wilde
| [reply] [d/l] |
Lhamo_rin,
Perhaps I am missing something here but IMHO the description of your issue could be better. Please read How do I post a question effectively? if you have not already done so. You could help us to help you by explaining in more detail what you have, if there is anything mentioned in the server logs (error_log for apache for example). Also check the permissions on this file, and have a read at ovid's fantastic Web Programming Using Perl which is chock full of general good advice and CGI debugging hints.
Hope this helps.
Martin | [reply] |