Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > error logs...

Reply
Thread Tools

error logs...

 
 
Paul Lalli
Guest
Posts: n/a
 
      06-24-2004
On Thu, 24 Jun 2004, Purl Gurl wrote:

> John wrote:
>
> (snipped)
>
> > I am just starting, testing things out (you know with the simple 'print
> > etc...')
> > Once it worked, but I added another line of print and it now goes to "The
> > page cannot be displayed" (500 error)

>
> If your code is not too long, quarter of a page or less, post it
> here so others can look at it.
>
> If really long, post a "plaintext" hyperlink to your code.
>
> None can help you without looking at your code.


I disagree. I believe that pointing the OP find where the error message
might be stored, as well as showing him/her how to have CGI::Carp display
the error messages in the browser window, are very helpful. Teaching a
man to fish, and all that.

Paul Lalli
 
Reply With Quote
 
 
 
 
Paul Lalli
Guest
Posts: n/a
 
      06-24-2004
On Thu, 24 Jun 2004, John wrote:

> >
> > Can you copy & past the script here please ?
> >
> >

> --------------------------------------------------------------------------
>
> #!/usr/local/bin/perl5
>
>
> $GetTime = 5;
> $NextOne = 6;
>
> print "This is a test of $GetTime\n"
> print "The next number is $NextOne\n"
>
> --------------------------------------------------------------------------
>
> Pretty basic, eh? If the <$NextOne = 6;> and <print "The next> etc.. isnot
> in there, then it shows:
>
> This is a test of 5
>
> But when the script it like it is above, it gives a HTTP 500 Internal server
> error.
>
> I am going to keep reading.
> Thanks for the help. I appreciate it.



John,

Your error is being caused by a missing semi-colon on the first print
line.

I strongly suggest you follow the advice I gave earlier, to add the line:

use CGI::Carp qw/fatalsToBrowser/;
right below the #!/usr/local/bin/perl5 line. This will cause the error
message to be printed to the browser, so you could see that you were
missing the semicolon.

Paul Lalli
 
Reply With Quote
 
 
 
 
John
Guest
Posts: n/a
 
      06-24-2004
>I strongly suggest you follow the advice I gave earlier, to add the line:

>use CGI::Carp qw/fatalsToBrowser/;
>right below the #!/usr/local/bin/perl5 line. This will cause the error
>message to be printed to the browser, so you could see that you were
>missing the semicolon.


>Paul Lalli


Paul,

I did add that line, and tried it. What I got back was:

"Software error:

Execution of ./testing.cgi aborted due to compilation errors.

For help, please send mail to the webmaster, etc..."

Although I'll admit this is more on the line I want... I know the simple
script has errors... or actually I am not worried about it working, I just
want an easy way to figure out what is wrong when hopefully I move onto
larger scripts.

Thanks for the help,
John


 
Reply With Quote
 
Paul Lalli
Guest
Posts: n/a
 
      06-24-2004
On Thu, 24 Jun 2004, John wrote:

> >I strongly suggest you follow the advice I gave earlier, to add the line:

>
> >use CGI::Carp qw/fatalsToBrowser/;
> >right below the #!/usr/local/bin/perl5 line. This will cause the error
> >message to be printed to the browser, so you could see that you were
> >missing the semicolon.

>
> >Paul Lalli

>
> Paul,
>
> I did add that line, and tried it. What I got back was:
>
> "Software error:
>
> Execution of ./testing.cgi aborted due to compilation errors.
>
> For help, please send mail to the webmaster, etc..."


Really? It didn't say
syntax error at testing.cgi line 8, near "print"
anywhere? That's odd. I'm wondering what version of Perl your host is
running.

> Although I'll admit this is more on the line I want... I know the simple
> script has errors... or actually I am not worried about it working, I just
> want an easy way to figure out what is wrong when hopefully I move onto
> larger scripts.


That CGI::Carp line is how you have perl display for you the error
messages to the browser. These are the same error messages you'd receive
if you were running the script just on the command line. You won't get
more information from Perl itself.

If you are curious about what version you're running as well, add this
line to your script:

printf "Ver: v%vd\n", $^V;

If the version isn't at least 5.6 (preferably 5., you might want to
consider at least asking your host if they'll upgrade.


Paul Lalli
 
Reply With Quote
 
John
Guest
Posts: n/a
 
      06-24-2004


>If you are curious about what version you're running as well, add this
>line to your script:


>printf "Ver: v%vd\n", $^V;


I added that and it gave back:

Ver: v%vd

Whatever that means... I have been looking through docs and faq of the
server, but I can't pin down exactly which Perl they are using. I'll keep
looking.

Thanks again,
John


 
Reply With Quote
 
A. Sinan Unur
Guest
Posts: n/a
 
      06-25-2004
"John " <(E-Mail Removed)> wrote in
news:04GCc.4775$(E-Mail Removed):

>>Read the FAQ.... oh wait, I'm not allowed to be snide... okay then,


> The comments were aimed at people like this one guy who was like
> "You're a newbie, you're lazy, go read the FAQ. You should know not
> to post this way, and to post that way." Just a bunch of rudeness
> without any substance. No links to where things are, just total
> unhelpfulness. If he's that upset, then just don't respond to me.


The fact that you made you comments before you received any 'snide' remarks
explains my unhelpfulness. If you had just made a request without a
preemptive attack, you would have received help from me as well. OTOH, you
have already received excellent advice, so you probably don't care.

--
A. Sinan Unur
http://www.velocityreviews.com/forums/(E-Mail Removed) (reverse each component for email address)
 
Reply With Quote
 
John
Guest
Posts: n/a
 
      06-25-2004

> The fact that you made you comments before you received any 'snide'

remarks
> explains my unhelpfulness. If you had just made a request without a
> preemptive attack, you would have received help from me as well. OTOH, you
> have already received excellent advice, so you probably don't care.
>
> --
> A. Sinan Unur


A. Sinan,

I had already received 'snide' comments from a guy in the comp.lang.perl
group ... I was supposed to realize that that newsgroup was defunct. That
there were FAQ's, that there were guidelines. That because I was a newbie I
was lazy. He even got on my case for typing PERL instead of Perl, among
other things... and that was the first time I had ever posted.

So again, sorry if you were thinned skinned about a disclaimer that
wasn't aimed at you, but for the people that sincerely are rude out there.

Cheers,
John


 
Reply With Quote
 
Eric Bohlman
Guest
Posts: n/a
 
      06-25-2004
"John " <(E-Mail Removed)> wrote in
news:rxKCc.4476$(E-Mail Removed):

> I had already received 'snide' comments from a guy in the
> comp.lang.perl
> group ... I was supposed to realize that that newsgroup was defunct.
> That there were FAQ's, that there were guidelines. That because I was
> a newbie I was lazy. He even got on my case for typing PERL instead of
> Perl, among other things... and that was the first time I had ever
> posted.


Usenet newsgroups (and for that matter, Usenet itself) have characteristics
that meet many of the anthropological criteria for cultures. When visiting
a foreign culture, it is normally considered necessary to make at least
some effort to familiarize oneself with it. For example, an American who
visits England and is surprised, or worse, indignant to find out that
people drive on the left side of the road hasn't put in that effort. There
is a stereotype that says that most Americans behave that way (we mostly
don't but the squeaky wheel gets the grease) and in fact it has a name: the
"ugly American." You're showing some signs of it.
 
Reply With Quote
 
nobull@mail.com
Guest
Posts: n/a
 
      06-25-2004
"John " <(E-Mail Removed)> wrote in message news:<04GCc.4775$(E-Mail Removed)>...
> >Read the FAQ.... oh wait, I'm not allowed to be snide... okay then, read
> >this:

>
> >http://www.perldoc.com/perl5.8.4/pod...ipt-runs-from-

> the-command-line-but-not-the->browser.--(500-Server-Error)


> The comments were aimed at people like this one guy who was like "You're a
> newbie, you're lazy,


That's "like" in the sense that if you rearrange my words you can make
up that sentence.

What I actually said was that experience has shown us that people who
use the word "newbie" in their _subject_ lines usually turn out to be
people who are also being lazy. This is true. I didn't make it true,
I just observed it to be true so there's no point you getting upset at
me about it.

I advised you, therefore, that you should avoid using the word
'newbie' in your subject lines if you didn't want people to start
reading your posts with a negative predisposition.

> ...go read the FAQ.


Yes, I advised you to go read the FAQ. You think this was not
helpfull advice? Actually, you should have been given the advice
"Before you post a question, look for a FAQ" by whomever gave you
Usenet access. If they didn't give you this advice then you should
complain to them and noone else.

> You should know not to post this way, and to post that way."


Yes, appart from not checking the FAQ, you did some other things that
are also considered rude in the environment of a technical Usenet
group. I pointed these out to you so that you could avoid them in
future. You think this was not helpfull advice?

> Just a bunch of rudeness


When you stumble into a new cultural environment and start interacting
without standing on the sidelines for a moment to observe the local
social customs this is rude (and not just in cyberspace). When
someone points out that you've just broken the local customs this is
not, in itself, rude it is an attempt to help. When you are the
1000th person, the person trying to help you is likely to be terse and
have a somewhat exasperated tone. Try to realise that you are the
1000th person and that the tersity and exasparation are consequences
of this fact and you should not interpret them as "being rude". If
you insist on regarding them as "being rude" then you should also
remember that you were rude first.

> without any substance.


I actually offered to do a detailed line-by-line criteque of your
script which, had it actually been your script, would probably have
helped your Perl programming a lot. This was a very substancial
offer.

But, as I suspected, the script in question was not one you'd wrote
but one you'd picked up somewhere. Like I said, a critique of such a
script would not have helped you.

> No links to where things are, just total unhelpfulness.


The whole point about a FAQ is that you consult it first before you
ask a question. If "where's the FAQ" is a legitimate question the
this defeats the point of there being a FAQ. FAQs have to be easy to
find.

> If he's that upset, then just don't respond to me.


Just because I didn't spoon-feed you didn't mean I was upset. I
treated you like an adult who'd made a social gaff a would probably
want to avoid repeating it. The "just don't respond" approach doesn't
work. Not only would you not be helped but also it would mean that
people who did take the time the lurk on the sidelines in order to
figure out what was accepted behaviour would think that what you did
was OK.
 
Reply With Quote
 
Brian McCauley
Guest
Posts: n/a
 
      06-25-2004
Eric Bohlman <(E-Mail Removed)> writes:

> "John " <(E-Mail Removed)> wrote in
> news:rxKCc.4476$(E-Mail Removed):
>
> > group ... I was supposed to realize that that newsgroup was defunct.
> > That there were FAQ's, that there were guidelines. That because I was
> > a newbie I was lazy. He even got on my case for typing PERL instead of
> > Perl, among other things... and that was the first time I had ever
> > posted.

>
> Usenet newsgroups (and for that matter, Usenet itself) have characteristics
> that meet many of the anthropological criteria for cultures. When visiting
> a foreign culture, it is normally considered necessary to make at least
> some effort to familiarize oneself with it. For example, an American who
> visits England and is surprised, or worse, indignant to find out that
> people drive on the left side of the road hasn't put in that effort. There
> is a stereotype that says that most Americans behave that way (we mostly
> don't but the squeaky wheel gets the grease) and in fact it has a name: the
> "ugly American." You're showing some signs of it.


Yes, I must confess, that I tend to assume that people who come here
and behave this way are Americans. However I was in at least one
recent case shown to be wrong. 'Player' revealed himself to be a Brit
(like me).

http://groups.google.com/groups?thre...ing.google.com

--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xffc Thread 0x228 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-30-2006 03:16 PM
Error connecting to SQLExpress 2005 locally (error: 26 - Error Locating Server/Instance Specified) hfk0 ASP .Net 2 03-27-2006 08:43 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 1 03-24-2006 04:20 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-24-2006 02:22 PM
Error 500: ERROR: Cannot forward. Writer or Stream already obtained. Error JavaQueries Java 1 03-01-2005 06:30 PM



Advertisments