» Home » Info » Vex.FAQ » web server error logs

web server error logs

The web server is actually on a different machine than that which you log in to as shell/ftp, and the web server machine is not generally accessable by regular users for security reasons. This means, at this time, you can not directly access the error logs.

<p> Update: we do now have a live "window" available to the last few minutes of the error log, for development purposes. You can access this by logging in to your Vex.Net user page, and looking for the "Web Errors" link.

<p> Most times, however, the error logs are wanted in order to debug CGI scripts; and there are other ways to go about this.

<table border="1" cellpadding="4" cellspacing="0"> <tr> <td valign="top">PERL</td> <td>In PERL for example, try putting the following code near the top of your script:

<pre> use CGI::Carp qw(fatalsToBrowser); </pre></td> </tr> <tr> <td valign="top">PYTHON</td> <td> In <a href="http://www.python.org">Python</a> there is a simple and flexible technique whereby you can easily redirect the <tt>stderr</tt> output to the browser, with code like the following:

<pre> import sys sys.stderr = sys.stdout print "content-type: text/htmln" </pre>

<p> Putting the above code near the beginning of your Python script will cause any run-time error messages to get output to the browser. With some creativity you can easily create whole wrappers around your CGI scripts to trap errors with Python. </td> </tr> </table>

<p> <I>But remember</I>, you should always try executing your CGI scripts from the shell prompt first, in order to catch any syntax/compile errors. This, and people forgetting to print the HTTP headers (and leaving a blank line after them), or the #! directive being missing or incorrect at the beginning of their script, are by far the most common errors made---even by experienced programmers!

<p> With a little effort it's very easy (and even more robust in many cases) to debug your scripts without the server error log access.

<p> If you <i>really</i> need the error logs for some special reason, it is possible that we could email them to you daily. Send email to <a href="mailto:support@vex.net">support@vex.net</a> if you require this service.

Document Actions