Robert Brown writes:
 > drieux writes:
 >  > the alternative of course is the simpler problem of
 >  > permissions, and that the web-server can not actually
 >  > read the file. Do you have a piece of test code that
 >  > merely opens and reads it?

I have a very simple utility -- actually a debug tool I wrote over a
year ago -- that likewise no longer works:

    #!/usr/bin/perl

    # get_dbm_record.pl <filename> <key>  -- output data for <key> on stdout

    $filename = shift;
    $key = shift;

    dbmopen(DBM, $filename, undef) || die "cannot open $filename: $!";

    $record = $DBM{$key};

    print $record;

Here is the file I am trying to read:

    # ls -l login.db 
    -rwxrwxrwx    1 apache   apache      12288 Aug 26 08:12 login.db

    (I even did a chmod 777 on it so perms could not be the problem)

This is what happens when I try to run this little script:

    # get_dbm_record.pl login.db  "rj"
    cannot open login.db:  at /bin/get_dbm_record.pl line 8.

BTW line 8 is:

    dbmopen(DBM, $filename, undef) || die "cannot open $filename: $!";

So it is not a case of a key that does not exist.

The "improvement squad" in perl-land just broke dbmopen(); there is no 
nicer way to put it.  If they wanted a better way to do it, fine, but
please do not break legacy stuff just because a more elegant way comes 
along.  Add the elegance, but keep the stuff people are already
depending on in production code.  Don't gratuitously break stuff that
has worked for years!  

I have no idea how many perl scripts have been broken by this little
"improvement".  I can only fix them as they come to light.  But I
cannot even fix them if I do not have another way to make it work.

<Grrr.....>

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to