Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

error logs...

 
 
John
Guest
Posts: n/a
 
      06-24-2004
I was under the impression that if you write a script in Perl that has
errors in it, you will get some kind of error page...

Is this true too for scripts on websites?

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)

Not the error page I expected.

this simple script is at
http://www.sigmachi-iotadelta.com/cg...ETTIMETEST.cgi

Thanks in advance for any help

(And for the rude people that say I should read documentation or FAQ, first
of all I don't know where the FAQ is, and I AM reading a book on Perl, but
the book only says that you get an error page that tells you basically where
the error is located, so if you have snide comments, please save them and
let those who actually want to help answer.)

--
Best,
John


 
Reply With Quote
 
 
 
 
Fergus Toolan
Guest
Posts: n/a
 
      06-24-2004
The web server will have error logs. If it is apache it will be in a
subdirectory of the apache root directory called logs. The file you need
is error.log Error messages should appear there.

Fergus

PS: That directory structure / filename is for standard apache
installations you would need to chack the specifics for your system.

John wrote:
> I was under the impression that if you write a script in Perl that has
> errors in it, you will get some kind of error page...
>
> Is this true too for scripts on websites?
>
> 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)
>
> Not the error page I expected.
>
> this simple script is at
> http://www.sigmachi-iotadelta.com/cg...ETTIMETEST.cgi
>
> Thanks in advance for any help
>
> (And for the rude people that say I should read documentation or FAQ, first
> of all I don't know where the FAQ is, and I AM reading a book on Perl, but
> the book only says that you get an error page that tells you basically where
> the error is located, so if you have snide comments, please save them and
> let those who actually want to help answer.)
>


 
Reply With Quote
 
 
 
 
Henk
Guest
Posts: n/a
 
      06-24-2004

"John " <(E-Mail Removed)> wrote in message
news:b0FCc.2122$(E-Mail Removed)...
> I was under the impression that if you write a script in Perl that has
> errors in it, you will get some kind of error page...
>
> Is this true too for scripts on websites?
>
> 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)
>
> Not the error page I expected.
>
> this simple script is at
> http://www.sigmachi-iotadelta.com/cg...ETTIMETEST.cgi
>
> Thanks in advance for any help
>
> (And for the rude people that say I should read documentation or FAQ,

first
> of all I don't know where the FAQ is, and I AM reading a book on Perl, but
> the book only says that you get an error page that tells you basically

where
> the error is located, so if you have snide comments, please save them and
> let those who actually want to help answer.)
>
> --
> Best,
> John
>
>


Can you copy & past the script here please ?


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

> I was under the impression that if you write a script in Perl that has
> errors in it, you will get some kind of error page...
>
> Is this true too for scripts on websites?


Only if you ask for them.

> 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)


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

http://www.perldoc.com/perl5.8.4/pod...0-Server-Error)


Your server is responsible for storing the error that perl actually
generated in an error log. If you don't know where that log is, ask your
system administrator.

Now, as I said above, you can ask Perl to print the error messages to the
browser instead of (just) the error log. To do that, add this line at the
top of the program:

use CGI::Carp qw(fatalsToBrowser);

That will cause the fatal errors to be displayed on the browser window as
well as the server logs.

> Not the error page I expected.
>
> this simple script is at
> http://www.sigmachi-iotadelta.com/cg...ETTIMETEST.cgi
>
> Thanks in advance for any help
>
> (And for the rude people that say I should read documentation or FAQ, first
> of all I don't know where the FAQ is, and I AM reading a book on Perl, but


The FAQ is located in a multitude of places. If you have command-line
access to your perl installation, you can get to it by typing the command
perldoc perlfaq
at the command line. If not, the easiest location for you to access it
might be
http://www.perldoc.com/perl5.8.4/pod/perlfaq.html

> the book only says that you get an error page that tells you basically where
> the error is located, so if you have snide comments, please save them and
> let those who actually want to help answer.)


I hope this is helpful. By the way, now that you do know the location of
the FAQ, there really is no excuse for not reading it. And if that's too
snide for you, oh well.

Paul Lalli
 
Reply With Quote
 
A. Sinan Unur
Guest
Posts: n/a
 
      06-24-2004
"John " <(E-Mail Removed)> wrote in
news:b0FCc.2122$(E-Mail Removed):

> (And for the rude people that say I should read documentation or FAQ,
> first of all I don't know where the FAQ is, and I AM reading a book on
> Perl, but the book only says that you get an error page that tells you
> basically where the error is located, so if you have snide comments,
> please save them and let those who actually want to help answer.)


Have you heard of Google? Do you know that the FAQ is installed on your
computer? If you do not have Perl installed on your development computer,
why not? Have you seen the posting guidelines posted here frequently?


--
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-24-2004

> Have you heard of Google?

Google? Thanks on the internet right? You do a search for Perl, see what you
get. Almost impossible to weed through the good and the bad without prior
knowledge.

>Do you know that the FAQ is installed on your
> computer? If you do not have Perl installed on your development computer,
> why not?


FAQ not on my computer, why would it be? Why would I install Perl on my
computer when I only rarely use it in web development.

>Have you seen the posting guidelines posted here frequently?


Didn't know I was supposed to look for a posting of guidelines. I read them
now, now that I know they existed.

I'll keep the:

"Be extra cautious when you get upset
- Count to ten before composing a followup when you are
upset
- Count to ten after composing and before posting when
you are upset"

part of the guidelines in mind.


Thanks again.
-John


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

> > Have you heard of Google?

> Google? Thanks on the internet right? You do a search for Perl, see what you
> get. Almost impossible to weed through the good and the bad without prior
> knowledge.


You can think I'm trolling if you want, but I feel the need to point out
that the first google return for "Perl FAQ" returns www.perl.com/perl/faq
which, of course, is the official Perl FAQ.

Paul Lalli
 
Reply With Quote
 
John
Guest
Posts: n/a
 
      06-24-2004
>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)

Thanks for actually giving the link. Obviously the 'snide' wasn't directed
at you. Before you get too thinned skinned, you should note that it did say
the 'rude' people. I mean I have no idea how everything works. The
Guidelines says to lurk, but hey, I didn't even know there were guidelines
and some people can be really unforgiving here. Sure it's annoying when
thousands of different people do the same thing, but it's not like I am ONE
person doing it A THOUSAND times ... it's my first time here, don't I get
one slide?

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.

So thanks again, and I hope you didn't get too upset for the comments that
had nothing to do with you.

Best,
John


 
Reply With Quote
 
John
Guest
Posts: n/a
 
      06-24-2004
>You can think I'm trolling if you want, but I feel the need to point out
>hat the first google return for "Perl FAQ" returns www.perl.com/perl/faq
>which, of course, is the official Perl FAQ.


>Paul Lalli



Well when I posted before to a server, one guy was like go read the FAQ ...
I figured it was a FAQ for the newsgroup and where would that be? He didn't
give any help ... when I do google searches, I just did Perl, or Perl
tutorial, or Perl help... and they talk like Perl is known already.

But like I said, it's noted, so now I know. I think I'll just go back to my
book.

Thanks again,
John


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

>
> 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.. is not
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


 
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