[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-developers] Re: cobalt-developers digest, Vol 1 #450 - 12 msgs



Corzo scribbled:

> I am writing some scripts on a RAQ3 server using MySQL.  I am getting the
> following error:
> The server encountered an internal error or misconfiguration and
> was unable
> to complete your request.
>
> With the server built in CGI-WRAP, I need to figure out where
> this internal
> error is occuring.

red herring!

>However, I am not the system admin so I don't have
> administrative priviledges.  Is there anything I can do to get information
> on the nature of this error?  Do I have to have admin rights?  If so, then
> what do I do once I get admin rights to view the cause of this error?

1) check path to perl is correct:

#!/usr/bin/perl

2) check script doesn't give you syntax error from telnet:

perl scriptname

- other errors may be ok (and probably expected if script needs input)

If compile error - read message and use info to work out where your mistake 
is. If no error, but html created, check top of output is

Content: text/html

followed by a blank line.

3) check you ftp'd the file up in ASCII mode, if created/edited elsewhere.

4) add the line:

use CGI::Carp 'fatalsToBrowser'; 

to the beginning of your script - this picks up non existant subs etc - 
remove when everything works.

5) add the line:

use strict;

to the beginning of your script. This means you *have* to declare *all* 
variables and will help you pick up typographical errors - $tmp/$temp
If you're a bit wobbly with Perl, leave it out, but only until you've learnt 
what use strict means

General Rule: Add 'use strict' to beginning of script if more than 10 lines 
of code - Randal Schwartz (paraphrased). 

6) If still getting server error, add this line to beginning of script:

print "Content-type: text/plain\n\n";

if script work ok until a certain browser response, comment the above line 
out, proceed to just before the error occurs, uncomment and then proceed.

If that doesn't help, you can always throw it my way as a quick job (fee on 
request :)

later

cLive ;-)