CGI interpreters and error messages

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
Vormav
-


Joined: 11 Jun 2006
Posts: 1

PostPosted: Sun Jun 11, 2006 6:15 am    Post subject: CGI interpreters and error messages Reply with quote

Hey. New Abyss user here. Just started messing around with Abyss earlier today after being recommended it by someone else, and I'm definitely liking what I've seen already. I was able to setup Python, Perl, PHP, Ruby and even Eruby without any problems, so things are definitely looking promising so far. Pretty slick application.

There's only one issue I'm trying to deal with right now: Error messages. That is, whenever I get any kind of error (a syntax error, perhaps) in any cgi application - php, ruby, whatever - my browser only sees a terribly unhelpful Internal Server Error 500, instead of returning the actual error message.
Now, I realize that this behavior is usually desired in web servers (except maybe when accessing the server as 127.0.0.1), because displaying error messages to anyone and everyone can pose a security risk, and I'm also fully aware that I can still see the errors generated in these cases by viewing the cgi.log file. However, I'm attempting to get all of this setup mainly as a development environment for developing CGI web pages - in which case I kind of need to be able to quickly and easily view error messages.
That being said, is there any way to get Abyss to output CGI errors not just to the cgi.log file, but to the browser that's attempting to view the CGI content as well?

Thanks!
And sorry if this issue has come up before. I've done some searches, but haven't found anything answering this specific question.


EDIT: Also, I received an Internal Server Error(500) when posting the topic. The post still went through, but just thought I'd mention it to be safe. ;)
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun Jun 11, 2006 2:40 pm    Post subject: Re: CGI interpreters and error messages Reply with quote

Vormav,

It is not easy to deal with error output. CGI scripts have two output streams: STDOUT and STDERR. All what is written to STDOUT is sent back to in the browser, and STDERR is forwarded to cgi.log.
Imagine now that your CGI script send some output to STDOUT, then some messages to STDERR, and just after that the rest of the output to STDOUT. If we allowed mixing both streams output and sending it back to the browser, this will generate unreadable pages (and which will confuse even the developer especially if the output is an image or a non-text object).

Many scripting languages offer facilities to make errors visible on the web pages directly, but this is language dependant.

If you want to follow in real time the errors that are dumped to cgi.log, we suggest using the tool Baretail from http://www.baremetalsoft.com/baretail/ . You can even create a alias pointing to the cgi.log file and browse it to get the contents of cgi.log on a regular basis from the browser.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group