Clarification of terms

Discussion in 'Perl Misc' started by rrosell, Jan 5, 2004.

  1. rrosell

    rrosell Guest

    I am using a guestbook from the Matt Wright scripts archive. Two of the
    variables required in a perl script (guestbook.pl) perplex me:

    First:
    $guestbookreal is referred to as the "system location" of the guestbook.
    The syntax statement offered statement is:

    $guestbookreal="/home/yourname/public_html/guestbook.html";

    Second:
    $guestlog="/home/yourname/public_html/guestlog.html";

    I am not certain how I should interpret this in terms of my angelfire web
    site?

    My web site homepage is:

    Http://www.angelfire.com/pro/wccft/index.html

    I would appreciate an explanation of this.

    Thanks,

    Richard
    rrosell, Jan 5, 2004
    #1
    1. Advertising

  2. rrosell

    Ben Morrow Guest

    "rrosell" <> wrote:
    > I am using a guestbook from the Matt Wright scripts archive.


    Don't.

    Ben

    --
    For the last month, a large number of PSNs in the Arpa[Inter-]net have been
    reporting symptoms of congestion ... These reports have been accompanied by an
    increasing number of user complaints ... As of June,... the Arpanet contained
    47 nodes and 63 links. [ftp://rtfm.mit.edu/pub/arpaprob.txt] *
    Ben Morrow, Jan 5, 2004
    #2
    1. Advertising

  3. Ben Morrow wrote:
    >
    > "rrosell" <> wrote:
    > > I am using a guestbook from the Matt Wright scripts archive.

    >
    > Don't.
    >
    > Ben


    why?
    Too well known?
    that guessbook was my first (second?) CGI and perl.
    it got me started in this mess to begin with.

    >
    > --
    Robert Wallace, Jan 5, 2004
    #3
  4. rrosell

    Ben Morrow Guest

    Robert Wallace <> wrote:
    > Ben Morrow wrote:
    > >
    > > "rrosell" <> wrote:
    > > > I am using a guestbook from the Matt Wright scripts archive.

    > >
    > > Don't.

    >
    > why?


    See <http://nms-cgi.sourceforge.net/faq_nms.html>.

    --
    don't get my sympathy hanging out the 15th floor. you've changed the locks 3
    times, he still comes reeling though the door, and soon he'll get to you, teach
    you how to get to purest hell. you do it to yourself and that's what really
    hurts is you do it to yourself just you, you and noone else *
    Ben Morrow, Jan 5, 2004
    #4
  5. rrosell

    Rocco Caputo Guest

    On Mon, 05 Jan 2004 16:00:10 -0500, Robert Wallace wrote:
    >
    > Ben Morrow wrote:
    >>
    >> "rrosell" <> wrote:
    >> > I am using a guestbook from the Matt Wright scripts archive.

    >>
    >> Don't.

    >
    > why?
    > Too well known?
    > that guessbook was my first (second?) CGI and perl.
    > it got me started in this mess to begin with.


    You could say that. :) Matt Wright's infamous for releasing buggy and
    insecure CGI scripts.

    http://www.google.com/search?q=insecure matt wright cgi

    --
    Rocco Caputo - - http://poe.perl.org/
    Rocco Caputo, Jan 5, 2004
    #5
  6. rrosell wrote:
    >
    > $guestbookreal="/home/yourname/public_html/guestbook.html";
    >
    > Second:
    > $guestlog="/home/yourname/public_html/guestlog.html";
    >
    > I am not certain how I should interpret this in terms of my
    > angelfire web site?


    Those are file paths. Paths are something quite different from URLs,
    so the URL to your homepage is irrelevant.

    I have no idea of Angelfire's directory structure. If you don't know
    the path to your web site, you'd better find out through Angelfire's
    documentation or through their support.

    Please note that your question is clearly off topic in this group.

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
    Gunnar Hjalmarsson, Jan 5, 2004
    #6
  7. rrosell

    Bx. C Guest

    "Ben Morrow" <> wrote in message
    news:btcngn$6jf$...
    >
    > Robert Wallace <> wrote:
    > > Ben Morrow wrote:
    > > >
    > > > "rrosell" <> wrote:
    > > > > I am using a guestbook from the Matt Wright scripts archive.
    > > >
    > > > Don't.

    > >
    > > why?

    >
    > See <http://nms-cgi.sourceforge.net/faq_nms.html>.
    >


    very interesting... how about Darryl Burgdorf's scripts?
    http://awsd.com/scripts

    well... aside from the fact that you have to pay for them? what would be
    your assessment of his scripts?
    Bx. C, Jan 6, 2004
    #7
  8. rrosell

    Ben Morrow Guest

    "Bx. C" <> wrote:
    > very interesting... how about Darryl Burgdorf's scripts?
    > http://awsd.com/scripts
    >
    > well... aside from the fact that you have to pay for them? what would be
    > your assessment of his scripts?


    If I have to pay for them, how am I going to make an assessment?

    As a general rule, I would say that anything that has been properly
    peer-reviewed (i.e. CPAN modules, nms-cgi, etc.) is 'safe', and
    anything which hasn't should be treated with the utmost suspicion.

    Ben

    --
    'Deserve [death]? I daresay he did. Many live that deserve death. And some die
    that deserve life. Can you give it to them? Then do not be too eager to deal
    out death in judgement. For even the very wise cannot see all ends.'
    :-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
    Ben Morrow, Jan 6, 2004
    #8
  9. Rocco Caputo wrote:
    >
    > On Mon, 05 Jan 2004 16:00:10 -0500, Robert Wallace wrote:
    > >
    > > Ben Morrow wrote:

    ....
    >
    > You could say that. :) Matt Wright's infamous for releasing buggy and
    > insecure CGI scripts.
    >

    oh, that's why.
    now I remember.
    I left a formmail.cgi from Matt's on my homepage root and forgot about
    it.
    boy did I pay for that.
    I'm still paying for it today.
    you remember the gaping sendmail hole in formmail.cgi? I certainly do.


    >
    > --
    > Rocco Caputo - - http://poe.perl.org/
    Robert Wallace, Jan 6, 2004
    #9
  10. rrosell

    Uri Guttman Guest

    >>>>> "BC" == Bx C <> writes:

    >> See <http://nms-cgi.sourceforge.net/faq_nms.html>.
    >>


    BC> very interesting... how about Darryl Burgdorf's scripts?
    BC> http://awsd.com/scripts

    BC> well... aside from the fact that you have to pay for them? what
    BC> would be your assessment of his scripts?

    too expensive. but you are comparing them to free.

    ok, i peeked.

    no strict
    no warnings
    package globals (TONS of them).
    & for sub calls
    looks like perl4 code
    too few modules used
    local()

    a sub full of this crap!

    $TodayOutside = 0;
    $TodayPages = 0;
    $TopDomain = "";
    $endhour = 0;
    $logsegment = "";
    %BytesHour = ();
    %BytesUserIDCounter = ();
    %DayFilesCounter = ();

    crappy code like this:

    $MonthlyFilesCounter{$Month}=$Accesses;
    $MonthlyBytesCounter{$Month}=$Bytes;
    $MonthlySessionsCounter{$Month}=$Domains;
    $MonthlyPViewsCounter{$Month}=$PViews;

    and more crap like this (repeated prints are the sign of a bad coder,
    even in perl4):

    print REPORT &commas($usersessions),"</STRONG> distinct visits; ";
    print REPORT "the typical visitor seems to have spent about <STRONG>";

    it IS perl4 code. it has no refs i can find. just parallel global
    hashes. oy!! i see a few perl5 things. a use line, chomp. but mostly
    perl4 code.

    regex bugs (using $1,$2 without testing the result of s///)

    is that enough?

    almost all web scripts like this on the net (free or paid) are CRAP
    code. this script can be modified easily, can't be extended (try dealing
    with tons of global hashes!), can't be reused in a larger OO system,
    hardwires html in code
    etc.

    since you seem to have paid for this code, i will send you a bill for my
    code review. that seems fair.

    uri

    --
    Uri Guttman ------ -------- http://www.stemsystems.com
    --Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
    Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
    Uri Guttman, Jan 6, 2004
    #10
  11. Uri Guttman wrote:
    >

    .........
    >
    > ok, i peeked.
    >
    > no strict
    > no warnings


    no comments (other than his credits in the begining)


    > package globals (TONS of them).
    > & for sub calls

    what's wrong with & it's explicit. you know for sure its your own
    functions.
    and your alt.?
    Robert Wallace, Jan 6, 2004
    #11
  12. rrosell

    Bill Guest

    > $guestbookreal is referred to as the "system location" of the guestbook.

    that's the physical path to the file on the server hard drive.

    > The syntax statement offered statement is:
    >
    > $guestbookreal="/home/yourname/public_html/guestbook.html";
    >
    > Second:
    > $guestlog="/home/yourname/public_html/guestlog.html";
    >
    > I am not certain how I should interpret this in terms of my angelfire web
    > site?
    >
    > My web site homepage is:
    >
    > Http://www.angelfire.com/pro/wccft/index.html
    >
    > I would appreciate an explanation of this.


    This is sort of cgi, not perl, but you could try running this on your cgi site:
    (untested)
    >>>>>>>>

    #!/usr/bin/perl -w
    use strict;
    use CGI;
    my $q = new CGI;
    print $q->header,
    $q->start_html,
    $q->h1("PATH_TRANSLATED:"),
    $q->h2($q->path_translated()),
    $q->end_html;

    <<<<<<<<<

    I'm told this does not work with all servers.
    Bill, Jan 6, 2004
    #12
  13. Robert Wallace <> writes:
    > what's wrong with & it's explicit. you know for sure its your own
    > functions.
    > and your alt.?


    perldoc perlfaq7

    "What's the difference between calling a function as &foo and foo()?"

    Short answer, it doesn't do what you think it does, and it's
    completely unnecessary to boot.

    -=Eric
    --
    Come to think of it, there are already a million monkeys on a million
    typewriters, and Usenet is NOTHING like Shakespeare.
    -- Blair Houghton.
    Eric Schwartz, Jan 6, 2004
    #13
  14. rrosell

    Uri Guttman Guest

    >>>>> "RW" == Robert Wallace <> writes:

    RW> Uri Guttman wrote:
    >>

    RW> ........
    >>
    >> ok, i peeked.
    >>
    >> no strict
    >> no warnings


    RW> no comments (other than his credits in the begining)


    >> package globals (TONS of them).
    >> & for sub calls

    RW> what's wrong with & it's explicit. you know for sure its your own
    RW> functions.

    it is wrong. see many mentions of this in this group. read perlsub and
    see what it really means.

    RW> and your alt.?

    like i care? i dispise all the bad code out there in these 'kiddie
    scripts'. most are written with bugs and security holes and are so
    poorly designed. their authors think they are $DIETY's gift to perl and
    web sites. bleccch.

    as someone else posted, look at the nms scripts on sourceforge.

    uri

    --
    Uri Guttman ------ -------- http://www.stemsystems.com
    --Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
    Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
    Uri Guttman, Jan 6, 2004
    #14
  15. Robert Wallace <> wrote:
    > Uri Guttman wrote:


    >> & for sub calls

    > what's wrong with &



    perldoc -q function

    What's the difference between calling a function as &foo and foo()?


    > and your alt.?



    foo()


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Jan 6, 2004
    #15
  16. Also sprach Uri Guttman:

    >>>>>> "RW" == Robert Wallace <> writes:

    >
    > RW> Uri Guttman wrote:
    > >>

    > RW> ........
    > >>
    > >> ok, i peeked.
    > >>
    > >> no strict
    > >> no warnings

    >
    > RW> no comments (other than his credits in the begining)
    >
    >
    > >> package globals (TONS of them).
    > >> & for sub calls

    > RW> what's wrong with & it's explicit. you know for sure its your own
    > RW> functions.
    >
    > it is wrong. see many mentions of this in this group. read perlsub and
    > see what it really means.


    The fact that it has two often unneeded side-effects may be questionable
    style, but it's certainly not wrong.

    As for one effect (the passing of @_), this one doesn't even show up when
    parens are used.

    > RW> and your alt.?
    >
    > like i care? i dispise all the bad code out there in these 'kiddie
    > scripts'. most are written with bugs and security holes and are so
    > poorly designed. their authors think they are $DIETY's gift to perl and
    > web sites. bleccch.


    And yet quite a few of such scripts get their job done. Bad code is not
    the privilege of kiddies. Some of the most disgusting examples of Perl
    code can be found in a typical Perl source distribution. Have a look at
    h2xs for instance.

    Tassilo
    --
    $_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
    pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
    $_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
    Tassilo v. Parseval, Jan 6, 2004
    #16
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lori Cole via .NET 247

    Laman's terms please!

    Lori Cole via .NET 247, Aug 29, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,648
    bruce barker
    Oct 28, 2004
  2. Patrick Olurotimi Ige

    Asp vs ASPX pages in terms of security

    Patrick Olurotimi Ige, Feb 10, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    848
    Scott Allen
    Feb 10, 2005
  3. savvy
    Replies:
    1
    Views:
    400
    savvy
    Jan 16, 2006
  4. Naveen Reddy

    Thinking in terms of Objects.

    Naveen Reddy, Jan 24, 2004, in forum: Java
    Replies:
    14
    Views:
    1,286
    paul brown
    Feb 2, 2004
  5. Dung Ping

    Terms in statistics

    Dung Ping, Mar 26, 2006, in forum: HTML
    Replies:
    2
    Views:
    350
    Dung Ping
    Mar 26, 2006
Loading...

Share This Page