For Programmers: Free Programming Magazines  


Home > Archive > PERL Programming > July 2004 > perl error









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author perl error
pfancy

2004-06-25, 6:40 pm

I wrote the hello world program they use in the tutorial and it worked the
first time. as says hello world then i tried it again and it says as Access
Denied. I don't understand what i did. And why it worked the first time
and not the next. when i tried to do the second practice program i started
getting that. Do i need to show the code that i wrote and see if i had any
errors or what. I'm still real new to learning perl but i want to learn it.
Any advice. And what do you need to be able to help me correct my problem
if any? thanks in advance.


Tintin

2004-06-25, 6:40 pm


"pfancy" <pfancy@bscn.com> wrote in message
news:40dc9fed@news.greennet.net...
> I wrote the hello world program they use in the tutorial and it worked the
> first time. as says hello world then i tried it again and it says as

Access
> Denied. I don't understand what i did. And why it worked the first time
> and not the next. when i tried to do the second practice program i

started
> getting that. Do i need to show the code that i wrote and see if i had

any
> errors or what. I'm still real new to learning perl but i want to learn

it.
> Any advice. And what do you need to be able to help me correct my problem
> if any? thanks in advance.


Are you hiding the context here? ie: CGI


pfancy

2004-06-26, 4:00 am


"Tintin" <me@privacy.net> wrote in message
news:2k3jnoF17n6oqU1@uni-berlin.de...
>
> "pfancy" <pfancy@bscn.com> wrote in message
> news:40dc9fed@news.greennet.net...
the[color=darkred]
> Access
time[color=darkred]
> started
> any
> it.
problem[color=darkred]
>
> Are you hiding the context here? ie: CGI


context? do you mean keeping the code from you? I did not mean to. I feel
like a dummy. but I just read something in the book and I forgot to change
the chmod code the second time. Sorry for the incovience. It workes now.
Hate when i over look the obvious. I know we all do at one time. Sorry
about that.
>
>



Tintin

2004-06-26, 8:55 am


"pfancy" <pfancy@bscn.com> wrote in message
news:40dcfdf0@news.greennet.net...
>
> "Tintin" <me@privacy.net> wrote in message
> news:2k3jnoF17n6oqU1@uni-berlin.de...
> the
> time
had[color=darkred]
learn[color=darkred]
> problem
>
> context? do you mean keeping the code from you? I did not mean to. I

feel
> like a dummy. but I just read something in the book and I forgot to change
> the chmod code the second time. Sorry for the incovience. It workes now.
> Hate when i over look the obvious. I know we all do at one time. Sorry
> about that.


'Access Denied" is neither a Perl nor an Operating System (at least non that
I know of) error, therefore I concluded that you must have left the context
of how you were running the script. Was it CGI related?


Gunnar Hjalmarsson

2004-06-26, 8:55 am

pfancy wrote:
> I wrote the hello world program they use in the tutorial and it
> worked the first time. as says hello world then i tried it again
> and it says as Access Denied. I don't understand what i did. And
> why it worked the first time and not the next. when i tried to do
> the second practice program i started getting that.


As Tintin suggested, you seem to be running the programs as CGI
scripts. "Access Denied" sounds to me as if you did not set the proper
permissions.

You didn't tell us which tutorial you are using, but you may find this
one useful: http://my.execpc.com/~keithp/bdlogcgi.htm

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
pfancy

2004-06-27, 3:55 am

"Tintin" <me@privacy.net> wrote in message
news:2k50bdF17tgc0U1@uni-berlin.de...
>
> "pfancy" <pfancy@bscn.com> wrote in message
> news:40dcfdf0@news.greennet.net...
worked[color=darkred]
as[color=darkred]
> had
> learn
> feel
change[color=darkred]
now.[color=darkred]
>
> 'Access Denied" is neither a Perl nor an Operating System (at least non

that
> I know of) error, therefore I concluded that you must have left the

context
> of how you were running the script. Was it CGI related?
>

Yes. I'm trying to learn cgi so i can make surveys. but i am having trouble
trying to understand. I get the 400 errors and sometimes the 500 erros. I
read about the errors in the Teach yourself CGI programming with perl 5 in a
w. book. Some of the practice i can get going while others i have
trouble with.


pfancy

2004-06-27, 3:55 am


"Gunnar Hjalmarsson" <noreply@gunnar.cc> wrote in message
news:2k572jF18adqkU1@uni-berlin.de...
> pfancy wrote:
>
> As Tintin suggested, you seem to be running the programs as CGI
> scripts. "Access Denied" sounds to me as if you did not set the proper
> permissions.
>
> You didn't tell us which tutorial you are using, but you may find this
> one useful: http://my.execpc.com/~keithp/bdlogcgi.htm
>
> --
> Gunnar Hjalmarsson
> Email: http://www.gunnar.cc/cgi-bin/contact.pl


Thanks. I will look into that.


Tintin

2004-06-27, 8:55 am


"pfancy" <pfancy@bscn.com> wrote in message
news:40de4e0e@news.greennet.net...
> that
> context
> Yes. I'm trying to learn cgi so i can make surveys. but i am having

trouble
> trying to understand. I get the 400 errors and sometimes the 500 erros. I
> read about the errors in the Teach yourself CGI programming with perl 5 in

a
> w. book. Some of the practice i can get going while others i have
> trouble with.


First thing you need to do is separate CGI from Perl. >99% of times when
someone is doing CGI stuff in Perl and think it is a Perl problem they are
invariably wrong and it ends up being a CGI/webserver issue. Basic rule of
thumb is if it runs fine from the command line and not from the browser, you
don't have a Perl problem.

Also, in my personal experience, any book of the "Teach yourself X in Y
days" is usually a piece of junk and should be thrown away before your brain
gets infested with bad Perl programming habits.

Does the book start all the scripts with

#!/usr/bin/perl -T
use strict;
use warnings;
use CGI;

???


Ken Down

2004-06-27, 3:55 pm

In article <2k7jfuF18glf5U1@uni-berlin.de>, "Tintin" <me@privacy.net> wrote:

> Also, in my personal experience, any book of the "Teach yourself X in Y
> days" is usually a piece of junk and should be thrown away before your
> brain gets infested with bad Perl programming habits.


I've got "Teach Yourself CGI Programming in a W" and it is less than
helpful. Uses jargon and technical terms without explaining them, examples
don't work, and so on.

Ken Down

--
__ __ __ __ __
| \ | / __ / __ | |\ | / __ |__ All the latest archaeological news
|__/ | \__/ \__/ | | \| \__/ __| from the Middle East with David Down
================================= and "Digging Up The Past"
Web site: www.diggingsonline.com
e-mail: diggings@argonet.co.uk


pfancy

2004-06-28, 4:07 pm


"Tintin" <me@privacy.net> wrote in message
news:2k7jfuF18glf5U1@uni-berlin.de...
>
> "pfancy" <pfancy@bscn.com> wrote in message
> news:40de4e0e@news.greennet.net...
non[color=darkred]
> trouble
I[color=darkred]
in[color=darkred]
> a
>
> First thing you need to do is separate CGI from Perl. >99% of times when
> someone is doing CGI stuff in Perl and think it is a Perl problem they are
> invariably wrong and it ends up being a CGI/webserver issue. Basic rule

of
> thumb is if it runs fine from the command line and not from the browser,

you
> don't have a Perl problem.
>
> Also, in my personal experience, any book of the "Teach yourself X in Y
> days" is usually a piece of junk and should be thrown away before your

brain
> gets infested with bad Perl programming habits.
>
> Does the book start all the scripts with
>
> #!/usr/bin/perl -T
> use strict;
> use warnings;
> use CGI;
>
> ???
>

Good question. It does start all the scripts with #!/usr/local/bin/perl
but i didn't see the other parts atleast not yet.


pfancy

2004-06-28, 4:07 pm


"Ken Down" <diggings@argonet.co.uk> wrote in message
news:na.d799e44cc5.a60290diggings@argonet.co.uk...
> In article <2k7jfuF18glf5U1@uni-berlin.de>, "Tintin" <me@privacy.net>

wrote:
>
>
> I've got "Teach Yourself CGI Programming in a W" and it is less than
> helpful. Uses jargon and technical terms without explaining them, examples
> don't work, and so on.
>
> Ken Down
>

Really. Some reason it seems to be helping me out some. Could be possible
we have the similar title but could be a different book. perhaps. Who know.
but thanks. Regardless I will keep researching. I always like to have 5
books or so dealing with the programs. so if one doesn't help, surely the
other will.


Ken Down

2004-06-29, 3:56 am

In article <40e04c69@news.greennet.net>, "pfancy" <pfancy@bscn.com> wrote:

> I always like to have 5 books or so dealing with the programs. so if one
> doesn't help, surely the other will.


Indeed. The book I mentioned did provide one or two clues where the
documentation that came with Optiperl let me down.

Ken Down

--
__ __ __ __ __
| \ | / __ / __ | |\ | / __ |__ All the latest archaeological news
|__/ | \__/ \__/ | | \| \__/ __| from the Middle East with David Down
================================= and "Digging Up The Past"
Web site: www.diggingsonline.com
e-mail: diggings@argonet.co.uk


pfancy

2004-07-02, 8:55 pm


"Ken Down" <diggings@argonet.co.uk> wrote in message
news:na.403a754cc6.a60290diggings@argonet.co.uk...
> In article <40e04c69@news.greennet.net>, "pfancy" <pfancy@bscn.com> wrote:
>
one[color=darkred]
>
> Indeed. The book I mentioned did provide one or two clues where the
> documentation that came with Optiperl let me down.
>
> Ken Down


I see.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com