Re: c email libraries

2003-03-21 Thread David M. Wilson
On Fri, Mar 21, 2003 at 05:47:01PM +, Lusercop wrote:

> I've read bits of it, when I wanted to know in advance that it was
> going to do what I needed it to do, and the documentation was not up
> to scratch. Trust me on this, or look at it yourself, but we've already
> had this discussion here recently. The code isn't either. It's write-only
> code. CClient, is, IMO, pretty similar. Virtually every line has at least
> 3 side-effects, and there is no sensible modularisation.

A smart little man (who didn't code at the time) once said to me "coding
is an art form, co-operative coding is just fucked". Whether you agree
or not with DJBs style of coding is irrelevant, the mere fact that qmail
has been so successful is testament in itself to DJBs programming
ability.


> 'lose', or perhaps 'luse'. I have read this stuff, and I'm prepared to hold
> my opinion on it. I notice that no one replied to my challenge to explain
> the constants in datetime.c.

Here's a quarter, go call someone that cares.


> Surprisingly enough, that's not what I'm going "yuck" about. 
>   <./lusercop -vv>

Irrelevant spiel.


> UNIX has had dynamic linking for well over 20 years, anyone who doesn't
> use it because he's a "traditionalist" is kidding himself. There are
> many reasons to prefer it over static linking.

Would you please stop emphasizing "traditionalist"? More spiel, once
again you are completely missing the point - I said IIRC (IMVHFO, AFAIK,
FOAD) c-client was designed for static compilation, eg. as PHP uses it.
I don't give a shiny penny about your UNIX linking knowledge.


> You quoted his message, it certainly looked like you were.

No. You assumed I was.


> > If it isn't Linux, then take a look around, there are hundreds of
> > sources of pre-compiled binaries (although maybe only tens of
> > trustable sources).

> Erm, we were talking about building from source, why do you introduce this
> irrelevant argument.

Users should not have to build, you idiot. I don't proof-read pointless
e-mails.


> > Well done for stating the complete obvious. Would you have laughed like
> > a child had I said "awk is a pretty portable text extraction tool"? "ha
> 
> No.
> 
> <./lusercop --aphorism -vvv>
> 
> I don't think your point is valid.

You're back in your ideal world again. Standards are just that, not the
gospel that everyone must comply to.


> > If you are a user and you cannot build a package, there's a good chance
> > you shouldn't be trying to in the first place.

> OK, I agree with you on this. But if many experienced sysadmins find
> c-client an annoyance, then perhaps there's something in that, no?

They should be e-mailling their nearest developer friend asking for a
package, or filing a bug report.


> It's my job, as you are no doubt aware, given that you've looked up who
> < !! - >

I know quite a few penetration testers, and all of them are able to have
a reasonable conversation without mentioning how insecure my MUA/X
server/Distro/back garden is.


> < !! >

> I haven't seen a SunOS install in, what, 6-7 years. Perhaps you mean
> Solaris.

No, I mean SunOS. Stop assuming you are superior to everyone else. In
the real world (ie. not your head) computers exist that may not be bang
up to date, your view seems to be the Microsoft one, ie. if it's older
than two years it's deprecated.

> < !! >

> I'll talk to who I like. If you don't like what I have to say then killfile
> me. I don't mind if you do or don't listen. I do object to being told what
> and what

Try typing with a little less anger, it results in less typos.


> And some do.

I didn't realize your mum was subscribed to the list.


> There are valid points to be debated here, but if you're just going to
> say "I'm right, don't talk to me anymore", then I think that you lose
> all credibility in such a debate.

Maybe I didn't pad my e-mail out with "IMHO" enough, but then I
shouldn't need to. You invite a nasty reply when you try to act like an
expert in every field. The fact is, you are 6 years older than me, still
act like a child, and have some sort of massive superiority complex.


> If the list admin doesn't like what I write, then it is up to him to say
> "you shouldn't have said that" or "don't post that". It is not up to you
> to say "the lurkers support me in email", and therefore you shouldn't post
> anymore.

I don't want you to go away, I just wish you didn't get on like such a
twat.

As it happens, I haven't actually written a line of perl in my life. I
have been listening to the perl lists for about 6 months now, after
attending a talk on perl 6, with which I was exponentially more
impressed than perl 5. I'm very easily tempted into a list war, and
apologize to those who have had to put up with these irrelevant
postings.

As for Matthew, if you haven't worked it out by now, I have absolutely
no respect for you and don't want to read another e-mail by you. The
only reason I'm replying tonight is because learning to troll is m

Re: How do you change colour of text output?

2003-03-21 Thread Phil Pereira
All,

Term::ANSIColor was perfect!!!

Many thanks all!

Phil.

On Fri, 21 Mar 2003 15:45:29 -0500
darren chamberlain <[EMAIL PROTECTED]> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> * Phil Pereira  [2003-03-21 15:20]:
> > The default output of my Perl scripts is to the screen, however, what
> > I want to do is change the output colour of the text as often /
> > necessary as I require.
> > 
> > So - what command???
> 
> Take a look at Term::ANSIColor.
> 
> (darren)
> 
> - -- 
> Words are also deeds.
> -- Lugwig Wittgenstein
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.2.1 (SunOS)
> 
> iD8DBQE+e3nozsinjrVhZaoRAnkTAJ9928EzlLdNA3LENK+h1Vl+0n/8DwCeNOu+
> b/6gBAxny23RTqsgUfMwLr4=
> =0q0O
> -END PGP SIGNATURE-
> 


-- 
Phil.
---
   (_ )
UNIX is "user-friendly",\\\", ) ^
it's just picky about its friends!\/, \(
 cXc_/_)
---



Re: How do you change colour of text output?

2003-03-21 Thread darren chamberlain
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

* Phil Pereira  [2003-03-21 15:20]:
> The default output of my Perl scripts is to the screen, however, what
> I want to do is change the output colour of the text as often /
> necessary as I require.
> 
> So - what command???

Take a look at Term::ANSIColor.

(darren)

- -- 
Words are also deeds.
-- Lugwig Wittgenstein
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (SunOS)

iD8DBQE+e3nozsinjrVhZaoRAnkTAJ9928EzlLdNA3LENK+h1Vl+0n/8DwCeNOu+
b/6gBAxny23RTqsgUfMwLr4=
=0q0O
-END PGP SIGNATURE-



Re: How do you change colour of text output?

2003-03-21 Thread Luis Campos de Carvalho
- Original Message - 
From: "Phil Pereira" <[EMAIL PROTECTED]>
Sent: Friday, March 21, 2003 5:16 PM


> Hey all!
> 
> Once again I wish to throw everyone off-topic : with a Perl question   :)
> 
> The default output of my Perl scripts is to the screen, 
> however, what I want to do is change the output colour 
> of the text as often / necessary as I require.
> 
> So - what command???

  I guess that's no that simple.
  What kind of Terminal are you using?
  What O.S.?
  CGI or stand-alone application?

  Please be patient and send more information...
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Luis Campos de Carvalho
  Computer Science Student
  OCP DBA Oracle & Unix Sys Admin
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=





Re: How do you change colour of text output?

2003-03-21 Thread Roger Burton West
On Fri, Mar 21, 2003 at 08:16:47PM +, Phil Pereira wrote:
>The default output of my Perl scripts is to the screen, however, what I want to do is 
>change the output colour of the text as often / necessary as I require.
>So - what command???

That's actually not trivial. Best bet is probably to use the Curses
libraries, though.

Roger



How do you change colour of text output?

2003-03-21 Thread Phil Pereira
Hey all!

Once again I wish to throw everyone off-topic : with a Perl question   :)

The default output of my Perl scripts is to the screen, however, what I want to do is 
change the output colour of the text as often / necessary as I require.

So - what command???

Many thanks

-- 
Phil.
---
   (_ )
UNIX is "user-friendly",\\\", ) ^
it's just picky about its friends!\/, \(
 cXc_/_)
---



Re: c email libraries

2003-03-21 Thread Robin Szemeti
On Friday 21 March 2003 17:47, Lusercop wrote:
> On Fri, Mar 21, 2003 at 03:51:16PM +, David M. Wilson wrote:

> > Please don't reply on-list either, a lot of people don't like listening
> > to you.
>
> And some do. Those who don't know how to use their killfiles. 

Since your email style is clearly intended to get at least someones back up, 
I'm not sure why you are surprised when it happens. 

A lot of what you say is of course quite correct, but I cant help thinking 
that the way you put it across is designed to get this sort of reaction. No 
doubt you have your reasons ... Surely just going down to the pub an knocking 
over peoples pints would provide a similar distraction without the need to 
think too hard?

> Lusercop.net - LARTing Lusers everywhere since 2002

2002? .. bloddy newbies ;)

-- 
Robin Szemeti



Re: Motherboard query

2003-03-21 Thread Shevek
On Fri, 21 Mar 2003, Jody Belka wrote:

> what i need is a micro atx form factor motherboard (or smaller) that is no
> more than 22.9cm on the port edge. i would prefer a sktA board, but skt370
> would do if necessary. also preferable would be pc100/pc133 memory, but
> i'll go with ddr if i have to.
> 
> so far i have only found the biostar M7VIG-D board, but it doesn't seem to
> be available anywhere yet. so, does anyone have any suggestions?

Assuming we're talking NAS case here, the boards in the 300s were made by 
MSI. I have the URL somewhere. One of the other people who bought one id'd 
the board in it.

S.

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




Motherboard query

2003-03-21 Thread Jody Belka
i'm trying to find a motherboard that i can fit into my case and thought
i'd ask here for any suggestions.

what i need is a micro atx form factor motherboard (or smaller) that is no
more than 22.9cm on the port edge. i would prefer a sktA board, but skt370
would do if necessary. also preferable would be pc100/pc133 memory, but
i'll go with ddr if i have to.

so far i have only found the biostar M7VIG-D board, but it doesn't seem to
be available anywhere yet. so, does anyone have any suggestions?


Jody





Re: c email libraries

2003-03-21 Thread Nicholas Clark
On Fri, Mar 21, 2003 at 05:47:01PM +, Lusercop wrote:

> I haven't seen a SunOS install in, what, 6-7 years. Perhaps you mean
> Solaris. I'm aware of the world outside linux/perl, and bzip2 is actually

bash-2.05$ uname -sr
SunOS 5.6

You could give the benefit of the doubt on that one.

> and I launched into an attack of why you were wrong. There are valid points

Personally I prefer reasoned arguments, sarcasm, irony and damning with feint
praise (even if I can't spell it). But that's just my opinion.

Nicholas Clark



Re: c email libraries

2003-03-21 Thread Lusercop
On Fri, Mar 21, 2003 at 03:51:16PM +, David M. Wilson wrote:
> On Fri, Mar 21, 2003 at 02:37:24PM +, Lusercop wrote:
> > A traditionalist whose idea of programming style is almost as good as djb's.
> In the real world, it is often the ugly hack that gets things done. As
> for DJB's style of coding, I don't understand most of it myself but
> according to some skilled sources, "it's quite nice". Said skilled

I've read bits of it, when I wanted to know in advance that it was
going to do what I needed it to do, and the documentation was not up
to scratch. Trust me on this, or look at it yourself, but we've already
had this discussion here recently. The code isn't either. It's write-only
code. CClient, is, IMO, pretty similar. Virtually every line has at least
3 side-effects, and there is no sensible modularisation.

> sources are the sort of people I don't get into arguments with, because
> I always loose. :)

'lose', or perhaps 'luse'. I have read this stuff, and I'm prepared to hold
my opinion on it. I notice that no one replied to my challenge to explain
the constants in datetime.c. That's the kind of code we're talking about.

> > > If I remember correctly, (and bearing the above comment in mind), said
> > > library is designed for static linking, aka:
> > >cc -c -o cclient.o ../cclient/cclient.c
> > >cc -I../cclient -o myprog $(MYPROG_OBJS) cclient.o
> > Yuck.
> Yeah, no ./configure.

Surprisingly enough, that's not what I'm going "yuck" about. I have a
problem with the "compile this thing from outside my source tree to an
object file inside my build tree so that I can link it". And, as you're
someone with fairly advanced C Compiler options understanding, you'd
know that the -I is irrelevant in the situation in which you have it,
you need it for building the dependencies of that final line.

UNIX has had dynamic linking for well over 20 years, anyone who doesn't
use it because he's a "traditionalist" is kidding himself. There are
many reasons to prefer it over static linking.

> > Oh, I dislike autotools, don't get me wrong, but not including information
> > about headers, API and library output *IS* woefully incomplete, by any
> > definition of the word. I know of many packages that *don't* use autotools
> > and still manage to get this kind of simple thing correct.
> As with any build tree, it's a build tree. I try to avoid doing builds
> myself now-adays, and know better than to complain when I don't get
> someone elses concept.

That's an interesting attitude. I don't think it's a useful one, though.
Kind of sympathetic magic, almost.

> > Oh, absolutely, and I'm also well aware in this case that Dave has them.
> > (bloody hell, I'm standing up for Cantrell, what's wrong with me?).
> I wasn't attacking Cantrell, I was simply stating a relevant opinion.

You quoted his message, it certainly looked like you were.

> > Basic linker knowledge should not extend to "what the  does this
> > guy think he's doing with this file". If the C is as badly written as
> > Mark Crispin's piece of junk, then you won't have a hope in hell of
> > doing anything with it unless you're an expert programmer.
> In this case, an end-user (effectively) having trouble installing a
> library from source is a good indication of a failure on the part of the
> Linux distribution in use.

!?!?! Where on EARTH did I say *anything* about Linux? There are many
other UNIXes out there, and yes, I use more than just Linux, in fact
the main one I use *isn't* linux. I'm certainly not convinced of this
assertion though.

> If it isn't Linux, then take a look around, there are hundreds of
> sources of pre-compiled binaries (although maybe only tens of trustable
> sources).

Erm, we were talking about building from source, why do you introduce this
irrelevant argument.

> > > The same could be said for make, a rather neat and portable way of
> > > keeping files in sync.
> > Hahahahahahahahahahahahahaha
> > You are joking, aren't you. Please tell me you are. How many different
> > versions of make do you think exist, with their respective bugs. It is
> > not actually possible to write a portable makefile that has any kind of
> > conditional dependency. At all.
> Well done for stating the complete obvious. Would you have laughed like
> a child had I said "awk is a pretty portable text extraction tool"? "ha

No.

You will notice no conditional dependency syntax elements in:
  http://www.opengroup.org/onlinepubs/007904975/utilities/make.html

This means that any such things are inherently unportable. If you'd have
come to Schwern's talk on MakeMaker, you'll have heard that one of the
biggest problems with it is trying to spit out the right kind of syntax
on each individual platform.

> ha ha LuserCopOs' awk doesn't let you change the IFS. Oh no, it's
> completely importable now."

You will also want to notice the "-F" option in:
  http://www.opengroup.org/onlinepubs/007904975/utilities/awk.html

I don't think your point is vali

Re: c email libraries

2003-03-21 Thread David M. Wilson
On Fri, Mar 21, 2003 at 02:37:24PM +, Lusercop wrote:

> A traditionalist whose idea of programming style is almost as good as djb's.

In the real world, it is often the ugly hack that gets things done. As
for DJB's style of coding, I don't understand most of it myself but
according to some skilled sources, "it's quite nice". Said skilled
sources are the sort of people I don't get into arguments with, because
I always loose. :)

> > If I remember correctly, (and bearing the above comment in mind), said
> > library is designed for static linking, aka:
> >cc -c -o cclient.o ../cclient/cclient.c
> >cc -I../cclient -o myprog $(MYPROG_OBJS) cclient.o

> Yuck.

Yeah, no ./configure.


> Oh, I dislike autotools, don't get me wrong, but not including information
> about headers, API and library output *IS* woefully incomplete, by any
> definition of the word. I know of many packages that *don't* use autotools
> and still manage to get this kind of simple thing correct.

As with any build tree, it's a build tree. I try to avoid doing builds
myself now-adays, and know better than to complain when I don't get
someone elses concept.


> Oh, absolutely, and I'm also well aware in this case that Dave has them.
> (bloody hell, I'm standing up for Cantrell, what's wrong with me?).

I wasn't attacking Cantrell, I was simply stating a relevant opinion.


> Basic linker knowledge should not extend to "what the  does this
> guy think he's doing with this file". If the C is as badly written as
> Mark Crispin's piece of junk, then you won't have a hope in hell of
> doing anything with it unless you're an expert programmer.

In this case, an end-user (effectively) having trouble installing a
library from source is a good indication of a failure on the part of the
Linux distribution in use.

If it isn't Linux, then take a look around, there are hundreds of
sources of pre-compiled binaries (although maybe only tens of trustable
sources).


> > The same could be said for make, a rather neat and portable way of
> > keeping files in sync.

> Hahahahahahahahahahahahahaha

> You are joking, aren't you. Please tell me you are. How many different
> versions of make do you think exist, with their respective bugs. It is
> not actually possible to write a portable makefile that has any kind of
> conditional dependency. At all.

Well done for stating the complete obvious. Would you have laughed like
a child had I said "awk is a pretty portable text extraction tool"? "ha
ha ha LuserCopOs' awk doesn't let you change the IFS. Oh no, it's
completely importable now."


> > Cursing people more skilled and/or intelligent than yourself is the
> > easiest thing to do on the planet[0], and just because a package doesn't

> Mark may be more intelligent than me, I'm not sure if he is or not. However,
> his coding "style" leaves exceedingly large amounts to be desired.

Said Jesus to his children.


> His ability to package software in any kind of sane way appears
> similar. The UW-IMAP server is a disaster area, and C-Client is a fair
> approximation at a guide of how *not* to program.

Once again, it is used successfully all over the place. Dry your eyes
and write a 'better' implementation if you are unhappy with it.


> > follow the GNU/Linux empire's way of tar.bz2 + 200k of m4 drivel,
> > doesn't mean it's of poor quality.

> Nobody said that it needed to have autoconf, and a lot of people don't
> like it, including myself. It does, however, seem to me that the C-Client
> code as it stands is indefensible. The build instructions are, as has been
> said already, woefully inadequate. The tar.bz2 argument is a straw man, in
> this case, it's mainly about file size, bzip2 is, quite simply, a better
> compression algorithm than compress.

I never implied David was complaining about the lack of the autotools,
or the packaging format (he didn't even mention this). My point was that
while c-client's build system and build instructions are unorthodox, it
is not up to the end user to judge it's quality by these factors. The
build system is just that -- end-users should not be building their own
binaries most of the time.

If you are a user and you cannot build a package, there's a good chance
you shouldn't be trying to in the first place.


> Next you'll be saying that someone using crypt(1) is in the right,
> because they're a "traditionalist", even though the attacks against it
> are well known.

No, that's sacrificing functionality (security) for portability. Why the
hell do you always end up ranting about security?


> > [0] I'm guilty of it here -- I guess now that c-client is packaged with
> > compress for portability.

> To provide the most hassle for any sysadmin who has to install it.

Try looking for a gzip or bzip2 binary on a SunOS or IRIX default
install. There's a whole world outside Linux/perl, Matthew.


> No, it just reads as if you don't know what you're talking about.

Don't talk to me.

Please don't reply on-list either, a 

RE: Beginners Help Needed again

2003-03-21 Thread Brian Smart
Hello All,
I don't know what has changed but it now works as described in the book!

Thanks for your help.

Regards

Brian Smart


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Paul Mison
Sent: 21 March 2003 13:37
To: [EMAIL PROTECTED]
Subject: RE: Beginners Help Needed again


On 21/03/2003 at 12:56 +, Jason Clifford wrote:

>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

It's worth checking that Apache is configured to run your script from 
the location it's in. I seem to recall that by default Apache will 
only serve CGI scripts from a cgi-bin/ directory, which is often 
distinct from the usual document root (where you store HTML files). 
If you search through httpd.conf for  'cgi' you may well find useful 
information.

When Brian said his your original that he got the message:

>Error Message: Permission denied
>Error Number: 13

it may be useful to know if that was displayed in the browser or the 
error logs.  If it was the browser, reading the error log (on Unix, 
'tail -f /var/log/apache/error_log' often works, but you'll need to 
confirm the location of the log file) may reveal other information 
that will help to find the source of the error.

-- 
:: paul
:: complies with canandian cs1471 protocol





Re: c email libraries

2003-03-21 Thread Lusercop
On Fri, Mar 21, 2003 at 12:49:56AM +, David M. Wilson wrote:
> On Thu, Mar 20, 2003 at 10:16:44PM +, David Cantrell wrote:
> > you how to compile it, but not what it calls the resulting library file, 
> > where to put it, or where the usual place for its header files is.  And 
> > heaven forbid that you could just make install.
> The UW c-client library seems to be maintained by a staunch
> traditionalist, it's packaged with compress ffs!

A traditionalist whose idea of programming style is almost as good as djb's.

> If I remember correctly, (and bearing the above comment in mind), said
> library is designed for static linking, aka:
>cc -c -o cclient.o ../cclient/cclient.c
>cc -I../cclient -o myprog $(MYPROG_OBJS) cclient.o

Yuck.

> WOEFULLY incomplete: their way of saying "no, we're not using GNU
> f**king autotools, and no, we're not writing a Makefile that will output
> shared libraries on every platform."

Oh, I dislike autotools, don't get me wrong, but not including information
about headers, API and library output *IS* woefully incomplete, by any
definition of the word. I know of many packages that *don't* use autotools
and still manage to get this kind of simple thing correct.

> > Eventually I got fed up with dealing with software packaged by fuckwits, 
> I think basic C compiler / linker knowledge is an essential part of
> system administration, and consider those who lack it to be fuckwits.

Oh, absolutely, and I'm also well aware in this case that Dave has them.
(bloody hell, I'm standing up for Cantrell, what's wrong with me?). Basic
linker knowledge should not extend to "what the  does this guy think
he's doing with this file". If the C is as badly written as Mark Crispin's
piece of junk, then you won't have a hope in hell of doing anything with it
unless you're an expert programmer.

> The same could be said for make, a rather neat and portable way of
> keeping files in sync.

Hahahahahahahahahahahahahaha

You are joking, aren't you. Please tell me you are. How many different
versions of make do you think exist, with their respective bugs. It is
not actually possible to write a portable makefile that has any kind of
conditional dependency. At all.

> Cursing people more skilled and/or intelligent than yourself is the
> easiest thing to do on the planet[0], and just because a package doesn't

Mark may be more intelligent than me, I'm not sure if he is or not. However,
his coding "style" leaves exceedingly large amounts to be desired. His ability
to package software in any kind of sane way appears similar. The UW-IMAP
server is a disaster area, and C-Client is a fair approximation at a guide
of how *not* to program.

> follow the GNU/Linux empire's way of tar.bz2 + 200k of m4 drivel,
> doesn't mean it's of poor quality.

Nobody said that it needed to have autoconf, and a lot of people don't
like it, including myself. It does, however, seem to me that the C-Client
code as it stands is indefensible. The build instructions are, as has been
said already, woefully inadequate. The tar.bz2 argument is a straw man, in
this case, it's mainly about file size, bzip2 is, quite simply, a better
compression algorithm than compress. Next you'll be saying that someone
using crypt(1) is in the right, because they're a "traditionalist", even
though the attacks against it are well known.

> [0] I'm guilty of it here -- I guess now that c-client is packaged with
> compress for portability.

To provide the most hassle for any sysadmin who has to install it.

> I was still forming an opinion as I wrote this e-mail, so yes, it does
> read a little messed up! :)

No, it just reads as if you don't know what you're talking about.

-- 
Lusercop.net - LARTing Lusers everywhere since 2002



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



RE: Beginners Help Needed again

2003-03-21 Thread Paul Mison
On 21/03/2003 at 12:56 +, Jason Clifford wrote:

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
It's worth checking that Apache is configured to run your script from 
the location it's in. I seem to recall that by default Apache will 
only serve CGI scripts from a cgi-bin/ directory, which is often 
distinct from the usual document root (where you store HTML files). 
If you search through httpd.conf for  'cgi' you may well find useful 
information.

When Brian said his your original that he got the message:

Error Message: Permission denied
Error Number: 13
it may be useful to know if that was displayed in the browser or the 
error logs.  If it was the browser, reading the error log (on Unix, 
'tail -f /var/log/apache/error_log' often works, but you'll need to 
confirm the location of the log file) may reveal other information 
that will help to find the source of the error.

--
:: paul
:: complies with canandian cs1471 protocol


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
>
>  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "DTD/xhtml1-transitional.dtd">
> http://www.w3.org/1999/xhtml"; lang="en-US">Hello
> Ice Cream
> Hello Ice Cream action="/./ice_cream.cgi" enctype="application/x-www-form-urlencoded">
> Please select a flavor:   />[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 '' 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 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
> 
>  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "DTD/xhtml1-transitional.dtd">
 
> 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 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


http://www.w3.org/1999/xhtml"; lang="en-US">Hello
Ice Cream
Hello Ice Cream
Please select a flavor:  [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 Roger Burton West
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 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 Peter Pimley

(If you're not running on unix then stop reading now)

There are two things that might cause this:
1) executable bit not set for your user
You might not have set the executable bit on your file.  Use chmod to set
it. (see a few lines down)

2) read/execute not enabled for everybody
If you can run the script on the command line but not through a browser,
then this is probably the problem.  You may have set the permissions so that
your user can execute the script, but don't forget that the webserver runs
as some other user (often as the user 'nobody').  Again use chmod to fix
this.


The command "chmod 755 ice_cream.cgi" will allow everybody (including the
web server) to read and run your script.  Only you will be able to edit it
though.



-Original Message-
From: Brian Smart [mailto:[EMAIL PROTECTED]
Sent: Friday, March 21, 2003 11:18 AM
To: London. [EMAIL PROTECTED] Pm. Org
Subject: Beginners Help Needed again


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



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: Starting Again

2003-03-21 Thread Philip Newton
On 20 Mar 2003 at 21:51, David Cantrell wrote:

> On Wednesday, March 19, 2003 09:34 + S Watkins <[EMAIL PROTECTED]> 
> wrote:
> > Paul Makepeace wrote:
> >> ... is where you keep warez, pr0n and rootkits.
> > Naaah, you keep them in "." Tricky to see and difficult to remove
> > without "tricks".
> 
> Which reminds me, I really need to create /usr/local/bin/perl^M and 
> /usr/bin/perl^M as symlinks, for users who upload CGIs with broken 
> line-endings.

Well, if this were still the 5.005 era, I'd reply, "Serves them right 
for not using -w".

However, now that warnings.pm is apparently The Way To Do It, that 
retort isn't as valid.

Cheers,
Philip
-- 
Philip Newton <[EMAIL PROTECTED]>