Re: Beginners Help Needed again

2003-03-24 Thread Jason Clifford
On Fri, 21 Mar 2003, Brian Smart wrote:

 I am trying to get the following cgi script called ice_cream.cgi to work. I
 has been copied from the 'Learning perl' book. When I call the script I get
 an error message:
 
 Error Message: Permission denied
 Error Number: 13
 
 Can someone explain what I might be doing wrong?

It's not your script. The error is specifically about a permissions issue. 

Is the script executable? Assuming you are on a *NIX platform chmod u+x 
the script.

Jason Clifford
-- 
UKFSN.ORG   Finance Free Software while you surf the 'net
http://www.ukfsn.org/   Get the T-Shirt Now




Beginners Help Needed again

2003-03-21 Thread Brian Smart
Hi All,
I am trying to get the following cgi script called ice_cream.cgi to work. I
has been copied from the 'Learning perl' book. When I call the script I get
an error message:

Error Message: Permission denied
Error Number: 13

Can someone explain what I might be doing wrong?

#!/usr/bin/perl -w
use CGI qw(:standard);
my $favorite = param(flavor);
print header, start_html(Hello Ice Cream), h1(Hello Ice Cream);

if ($favorite) {
print p(Your favorite flavor is $favorite );
} else {
print hr, start_form;
print p(Please select a flavor: , textfield(flavor,mint));
print end_form, hr;
   }


Thanks for your help.

Regards

Brian Smart




Re: Beginners Help Needed again

2003-03-21 Thread David M. Wilson
On Fri, Mar 21, 2003 at 11:17:47AM -, Brian Smart wrote:
 
 Hi All,
 I am trying to get the following cgi script called ice_cream.cgi to work. I
 has been copied from the 'Learning perl' book. When I call the script I get
 an error message:
 
 Error Message: Permission denied
 Error Number: 13

Try doing chmod +x ice_cream.cgi from the command prompt, or if you are
uploading the script to a web server using FTP, try right-clicking on
ice_cream.cgi on the server and looking for a SITE CHMOD or Change
modes type option. It may be buried in Properties somewhere.

After you find that, turn on execute (X) permission for the file.
Hopefully that's your problem, but that error may occur due to a few
other things too.

David.



Re: Beginners Help Needed again

2003-03-21 Thread Shevek
Either type perl scriptname.pl or type chmod a+x scriptname.pl

S.

On Fri, 21 Mar 2003, Brian Smart wrote:

 Hi All,
 I am trying to get the following cgi script called ice_cream.cgi to work. I
 has been copied from the 'Learning perl' book. When I call the script I get
 an error message:
 
 Error Message: Permission denied
 Error Number: 13
 
 Can someone explain what I might be doing wrong?
 
 #!/usr/bin/perl -w
 use CGI qw(:standard);
 my $favorite = param(flavor);
 print header, start_html(Hello Ice Cream), h1(Hello Ice Cream);
 
 if ($favorite) {
 print p(Your favorite flavor is $favorite );
 } else {
 print hr, start_form;
 print p(Please select a flavor: , textfield(flavor,mint));
 print end_form, hr;
}
 
 
 Thanks for your help.
 
 Regards
 
 Brian Smart
 
 
 

-- 
Shevekhttp://www.anarres.org/
I am the Borg. http://design.anarres.org/




RE: Beginners Help Needed again

2003-03-21 Thread Brian Smart
Hello David,
I have checked the file and directory attributes. They are set to read and
execute OK. Still no luck.

Regards

Brian Smart


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of David M. Wilson
Sent: 21 March 2003 11:13
To: [EMAIL PROTECTED]
Subject: Re: Beginners Help Needed again


On Fri, Mar 21, 2003 at 11:17:47AM -, Brian Smart wrote:

 Hi All,
 I am trying to get the following cgi script called ice_cream.cgi to work.
I
 has been copied from the 'Learning perl' book. When I call the script I
get
 an error message:

 Error Message: Permission denied
 Error Number: 13

Try doing chmod +x ice_cream.cgi from the command prompt, or if you are
uploading the script to a web server using FTP, try right-clicking on
ice_cream.cgi on the server and looking for a SITE CHMOD or Change
modes type option. It may be buried in Properties somewhere.

After you find that, turn on execute (X) permission for the file.
Hopefully that's your problem, but that error may occur due to a few
other things too.

David.





RE: Beginners Help Needed again

2003-03-21 Thread Brian Smart
Hi,
My web server is unix Apache. I am running Window2000 on my machine.
If I use ssh to contact my website, change to the cgi-bin directory and
enter ./icecream.cgi as stated with the web host documentation, I get the
following:

Content-Type: text/html; charset=ISO-8859-1

!DOCTYPE html
PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
DTD/xhtml1-transitional.dtd
html xmlns=http://www.w3.org/1999/xhtml; lang=en-USheadtitleHello
Ice Cream/title
/headbodyh1Hello Ice Cream/h1hr /form method=post
action=/./ice_cream.cgi enctype=application/x-www-form-urlencoded
pPlease select a flavor:  input type=text name=flavor value=mint
//p/formhr /[bsmart cgi-bin]$

Unfortunately this means nothing to me. I hope it means something to you
all!

Thanks for your further help.

Regards

Brian Smart


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Roger Burton West
Sent: 21 March 2003 11:45
To: [EMAIL PROTECTED]
Subject: Re: Beginners Help Needed again


On Fri, Mar 21, 2003 at 11:50:31AM -, Brian Smart wrote:
I have checked the file and directory attributes. They are set to read and
execute OK. Still no luck.

Make sure that /usr/bin/perl exists - on some systems (you still haven't
told us anything about your system!) it's /usr/local/bin/perl instead,
for example.

We need more information. What web server, what operating system?

Roger





RE: Beginners Help Needed again

2003-03-21 Thread Jason Clifford
On Fri, 21 Mar 2003, Brian Smart wrote:

 My web server is unix Apache. I am running Window2000 on my machine.
 If I use ssh to contact my website, change to the cgi-bin directory and
 enter ./icecream.cgi as stated with the web host documentation, I get the
 following:
 
 Content-Type: text/html; charset=ISO-8859-1
 
 !DOCTYPE html
 PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
 DTD/xhtml1-transitional.dtd
snip 
 Unfortunately this means nothing to me. I hope it means something to you
 all!

The output is the HTML for your webpage and it proves that the script is 
executable by your userid and that the path to the perl interpreter is 
correct.

It would seem reasonable to state that the problem is that the script is 
not executable by the web process.

Ensure that the user your apache process runs as has execute and read 
rights to the script. The easiest way to do this is probably chmod 705 
ice-cream.cgi

Jason Clifford
-- 
UKFSN.ORG   Finance Free Software while you surf the 'net
http://www.ukfsn.org/   Get the T-Shirt Now




Re: Beginners Help Needed again

2003-03-21 Thread Luis Campos de Carvalho
- Original Message -
From: Brian Smart [EMAIL PROTECTED]
Sent: Friday, March 21, 2003 10:01 AM


 Hi,
 My web server is unix Apache. I am running Window2000 on my machine.
 If I use ssh to contact my website, change to the cgi-bin directory and
 enter ./icecream.cgi as stated with the web host documentation, I get
the
 following:

 Content-Type: text/html; charset=ISO-8859-1

 !DOCTYPE html
 PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
 DTD/xhtml1-transitional.dtd
 html xmlns=http://www.w3.org/1999/xhtml; lang=en-USheadtitleHello
 Ice Cream/title
 /headbodyh1Hello Ice Cream/h1hr /form method=post
 action=/./ice_cream.cgi enctype=application/x-www-form-urlencoded
 pPlease select a flavor:  input type=text name=flavor value=mint
 //p/formhr /[bsmart cgi-bin]$

 Unfortunately this means nothing to me. I hope it means something to you
 all!

  Hello, list folks. Hello, Brian.

  Don't worry, this will mean a lot for you soon.
  =-]

  I see that your perl and CGI script are fine.
  IMHO, it looks like a miss-configuration on your apache server.
  Please verify your 'Directory' run-time directives on your Apache
configuration files. Another possibility is the absence of a 'ScriptAlias'
directive.

  Good luck.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Luis Campos de Carvalho
  Computer Science Student
  OCP DBA Oracle  Unix Sys Admin
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=





Re: Beginners Help Needed again

2003-03-21 Thread Robin Szemeti
On Friday 21 March 2003 11:13, Shevek wrote:
 Either type perl scriptname.pl or type chmod a+x scriptname.pl

to be totally nitpicky correct ... scripts on many platforms need to be chmod 
a+rx   ... binaries need execute permissions, scripts need read and execute 

chmod 755 scriptname is the much same thing.

 S.

 On Fri, 21 Mar 2003, Brian Smart wrote:
  Hi All,
  I am trying to get the following cgi script called ice_cream.cgi to work.
  I has been copied from the 'Learning perl' book. When I call the script I
  get an error message:
 
  Error Message: Permission denied
  Error Number: 13
 
  Can someone explain what I might be doing wrong?
 
  #!/usr/bin/perl -w
  use CGI qw(:standard);
  my $favorite = param(flavor);
  print header, start_html(Hello Ice Cream), h1(Hello Ice Cream);
 
  if ($favorite) {
  print p(Your favorite flavor is $favorite );
  } else {
  print hr, start_form;
  print p(Please select a flavor: , textfield(flavor,mint));
  print end_form, hr;
 }
 
 
  Thanks for your help.
 
  Regards
 
  Brian Smart

-- 
Robin Szemeti