Loginskip to content

November 3rd, 2006

format that turns many characters into a hexadecimal

[1] edwas written by Ken Thompson. It was suggested that his car sported a single indicator on the dashboard: a giant ‘?’ which would light up when anything was wrong, and the experienced driver would usually know what it meant. Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. It usually goes on to suggest that you look in the server error log, but unfortunately it doesn’t go to the trouble of including the part that might be relevant. If at all possible, get an interactive login on the Web server for which you are developing. If you can’t, consider using a different service. There are several reasons for this, starting with the fact that it is a lot easier to look at the error log file if we can look at it with programs like tailor less than if we have to view the whole thing through a Web page. If you can’t get an interactive login, you may nevertheless be able to figure out where your Web server keeps its log files (the defaults are well known and commonly used) and you then can use a CGI program like the following to look at the last ten (say) lines: #!/usr/bin/perl -Tw use strict; use CGI qw(:standard); my $TAIL = 10; print header, start_html; my @lines; # Change next line as needed my $file = “/usr/local/apache/logs/error_log”; open (IN, $file) or die p(b(”Unable to open $file: $!”)); while () { push @lines, $_; shift @lines if @lines > $TAIL; } print p(”Total number of lines = $.nLast $TAIL lines:n”); close IN; print pre(@lines), end_html; Little tools like this populate the black bag carried by CGI programmers from job to job. In fact, if you can’t even get Perl working on a (Unix) site that you can’t log in to, here’s a Bourne shell version: #!/usr/bin/sh
Note: If you are looking for high quality webhost to host and run your jsp application check Vision jsp hosting services

Comments are closed.