|
|
|
|
|
|
| Author |
Message |
Rafa³ Kot *nix forums beginner
Joined: 27 May 2005
Posts: 3
|
Posted: Fri May 27, 2005 12:07 pm Post subject:
Re: Win32::API problem...
|
|
|
Sisyphus napisa³(a):
[...]
| Quote: | Oh ..... in that case we need that ppm that you downloaded. Somehow there
are 2 versions of Win32::API kicking around on that box - and I don't know
how that has come about. I would still try again by first deleting what you
have installed:
ppm remove Win32-API
then try to install using the ppm package you downloaded:
ppm install Win32-API.ppd
If that still fails can you provide us with a link to the ppm package that
you downloaded so that we can see exactly what you have (and also tell us if
the error has changed from what you originally got).
|
Hello.
I'v done everything from begin, even perl reinstall, and now
its working. Strange
Anyway thanks for your help!
--
Pozdrawiam
Rafal Kot |
|
| Back to top |
|
 |
J. Gleixner *nix forums Guru Wannabe
Joined: 10 Mar 2005
Posts: 195
|
Posted: Fri May 27, 2005 4:50 pm Post subject:
Re: LWP::UserAgent credentials netloc and realm
|
|
|
John Stumbles wrote:
Port no, no. Port number, yes. :-)
| Quote: | credentials("http://abc.com:80", "realm", "uname", "passwd");
The other thing that threw a lot of people, including me, was what exactly
'netloc' and 'realm' are. 'realm' is whatever the server is configured to
ask you e.g. "Enter username and password for foo at abc.com".
|
FYI:
The realm is only the "foo" part, in your example, and is typically
(always?) displayed in the authentication window enclosed by double quotes.
Take a look at the server's response header. The realm information is
returned as WWW-Authenticate. e.g.
WWW-Authenticate: Basic realm="realm info here"
The authentication window would then read:
Enter username and password for "realm info here" at my.host.com.
| Quote: |
It would be nice to have this explained in the docs but as a 2nd best I hope
this will come up closer to the top of a google search for anyone asking in
future. |
|
|
| Back to top |
|
 |
Alan J. Flavell *nix forums Guru
Joined: 05 Mar 2005
Posts: 311
|
Posted: Fri May 27, 2005 5:15 pm Post subject:
Re: LWP::UserAgent credentials netloc and realm
|
|
|
On Fri, 27 May 2005, John Stumbles wrote:
| Quote: | The other thing that threw a lot of people, including me, was what
exactly 'netloc' and 'realm' are.
|
"realm" is a technical term defined in the Basic Authentication
specification. What you're providing here is Basic Authentication.
I'd say that fits the requirements.
| Quote: | 'realm' is whatever the server is configured to
ask you e.g. "Enter username and password for foo at abc.com".
|
*If* that's what the realm was configured to be at the server.
| Quote: | It would be nice to have this explained in the docs
|
The trouble with providing alternative specifications is that they
risk coming out inaccurately. I'd prefer a reference to the relevant
RFC, which currently would be 2617 I think.
There's a reasonable presentation of the server-side issues at the
Apache server web site. |
|
| Back to top |
|
 |
John Stumbles *nix forums beginner
Joined: 27 May 2005
Posts: 21
|
Posted: Sat May 28, 2005 2:04 pm Post subject:
Re: LWP::UserAgent credentials netloc and realm
|
|
|
J. Gleixner wrote:
snip info on authentication (and ditto Alan J. Flavell's post, for which
many thanks).
The point I'm trying to make is that I'm sure I'm not the only person for
whom Life Is Too Short(tm) to get into deep understanding of all the
protocols and specifications involved, which is one reason I like Perl and
Perl modules, because they let me get things done quickly and easily
without having to understand, let alone code, all the tricky stuff.
Don't get me wrong, I agree that the docs should have pointers to the
reference info such as RFCs, but it's also very helpful to have useful
examples of how, typically, to do the sorts of things one might want to do
with the module. In my case I just wanted to get my IP address from my DSL
router, and I needed to get past its authentication mechanism to do so. I
don't _want_ to know any more about authentication (right now: I might in
the future and I'll come back to your informative posts for info when and
if I need that).
regards |
|
| Back to top |
|
 |
Sisyphus *nix forums Guru
Joined: 04 Mar 2005
Posts: 503
|
Posted: Fri Jun 03, 2005 1:53 am Post subject:
Re: Convert::ASN1 - Decode error
|
|
|
"patg007" <patrick.grenier@gmail.com> wrote in message
news:1117727199.408585.273500@f14g2000cwb.googlegroups.com...
| Quote: | Hi all,
I want to decode a .der file. I upgrade my version to 0.19 but I still
have the same trouble, when I use Data Dumper it gives :
'error' => 'decode error at
/usr/lib/perl5/site_perl/5.8.1/Convert/ASN1/_decode.pm line 123
but asn_dump works find, my asn.1 seems ok.
In fact when I do a decode like that $data =
$structure->decode($dataToCheck);
Dumper of $data gives $VAR1 = undef;
So after when I want to do a $data->{'field1'}->{'field2'}; of course
it prints nothing.
I set the option $asn->configure( decode => { encoding => DER } );
before, don't know if the problem occurs because of that.
I would like to know if somebody had the same problem before and from
what it could come from. I can send my little program if somebody wants
more details.
|
Post the program here. It's quite acceptable to do that - in fact, it's
expected of you. It's also expected that the script you post be as small as
you can make it, but still demonstrate the problem that you're facing.
Cheers,
Rob |
|
| Back to top |
|
 |
Dieter Brennsteiner *nix forums beginner
Joined: 03 Jun 2005
Posts: 3
|
Posted: Fri Jun 03, 2005 4:03 am Post subject:
Re: DBI - DBD-DB2 Problem - Please help
|
|
|
Thankx for ya help so far.
Well that“s what I tought it would be but, we were setting alle
environments in our cgi already:
$ENV{'PATH'} =
'/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/home/db2p/sqllib/bin:/home/db2p/sqllib/adm:/home/db2p/sqllib/misc';
$ENV{'LD_LIBRARY_PATH'} = '/usr/IBMdb2/V6.1/lib';
$ENV{'DB2DIR'} = '/usr/IBMdb2/V6.1';
$ENV{'DB2INSTANCE'} = 'db2p';
$ENV{'CLASSPATH'} =
'/home/db2p/sqllib/java/db2java.zip:/home/db2p/sqllib/java/runtime.zip:/home/db2p/sqllib/java/sqlj.zip';
Do we have to set some env in the httpd.conf of our apache ??
Thanx
Jonathan Leffler schrieb:
| Quote: | Dieter Brensteiner wrote:
I can run my index.cgi program without error against a db2 Database
from command line ! There are no errors at all.
Good - so you know what the correct environment should be.
When I try to run the index.cgi file on my apache redhat ws4 i get the
following error:
install_driver(DB2) failed: Can't load
'/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/DB2/DB2.so'
for module DBD::DB2: libdb2.so.1: cannot open shared object file: No
such file or directory at
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /var/www/htdocs/csc/index.cgi line 113
Please can anybody help ? Urgently
Most likely, the environment that works on the command line is not
available in the web server environment. Look up the PassEnv and SetEnv
directives.
(The odds that a problem of the form 'it works on the command line and
not via a web server' is caused by faulty environment settings are
astoundingly high; it covers more than 99% of the cases I've seen.)
In case of doubt, write a web page that dumps the environment it
receives. Then compare that with your working environment. The problem
will, most likely, be obvious.
|
|
|
| Back to top |
|
 |
Dieter Brennsteiner *nix forums beginner
Joined: 03 Jun 2005
Posts: 3
|
Posted: Fri Jun 03, 2005 4:46 am Post subject:
Re: DBI - DBD-DB2 Problem - Please help
|
|
|
Jonathan Leffler schrieb:
| Quote: | Dieter Brensteiner wrote:
I can run my index.cgi program without error against a db2 Database
from command line ! There are no errors at all.
Good - so you know what the correct environment should be.
When I try to run the index.cgi file on my apache redhat ws4 i get the
following error:
install_driver(DB2) failed: Can't load
'/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/DB2/DB2.so'
for module DBD::DB2: libdb2.so.1: cannot open shared object file: No
such file or directory at
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /var/www/htdocs/csc/index.cgi line 113
Please can anybody help ? Urgently
Most likely, the environment that works on the command line is not
available in the web server environment. Look up the PassEnv and SetEnv
directives.
(The odds that a problem of the form 'it works on the command line and
not via a web server' is caused by faulty environment settings are
astoundingly high; it covers more than 99% of the cases I've seen.)
In case of doubt, write a web page that dumps the environment it
receives. Then compare that with your working environment. The problem
will, most likely, be obvious.
|
Thankx for your help, found the error which was the Setenv
LD_LIBRARY_PATH in the httpd.conf.
Thanks again, see ya |
|
| Back to top |
|
 |
patg007 *nix forums beginner
Joined: 02 Jun 2005
Posts: 5
|
Posted: Fri Jun 03, 2005 6:53 am Post subject:
Re: Convert::ASN1 - Decode error
|
|
|
Ok thanks Rob. I'm quite new on forums.
Well I don't see a way to post files by google so I copy that directly
here. I can't copy the .der file too so you'll not be able to test it.
I will try to post that to your email, to attach the 2 files. Or do you
know another way ?
Here is a resume of my perl program. It still have 168 lines but
because of the asn.1 structure. Tested with Convert::ASN1 v0.19 (the
last). If you copy and test it with the good .der it prints debug
infos, I mean it is totally operationnal for tests.
Regards,
Pat.
#!/usr/bin/perl
##############################
# we want to read a asn.1 file
##############################
use Convert::ASN1 qw(:all);
use Getopt::Long;
use Data::Dumper;
my ($file, $data, $dataToCheck);
# -file answer.der
GetOptions ('file=s' => \$file);
# read asn.1 file
my $fileSize = (stat($file))[7];
print "\nsize $fileSize";
print "\nfile $file";
open(INPUT, $file) || die "can't open $file: $!\n";
binmode INPUT;
read INPUT, $dataToCheck, $fileSize;
close(INPUT);
my $asn = Convert::ASN1->new;
# we use Der not Ber
$asn->configure( decode => { encoding => DER } );
# the asn.1
$asn->prepare(q<
SerValResponse ::= SEQUENCE {
responseStatus SerValResponseStatus,
responseBytes [0] EXPLICIT ResponseBytes OPTIONAL
}
SerValResponseStatus ::= ENUMERATED {
successful (0),
malformedRequest (1),
internalError (2),
tryLater (3),
--(4)
sigRequired (5),
unauthorized (6)
}
ResponseBytes ::= SEQUENCE {
responseType OBJECT IDENTIFIER,
response BasicSerValResponse
}
responseValue ::= CHOICE {
basicResponse BasicSerValResponse
}
BasicSerValResponse ::= SEQUENCE {
tbsResponseData ResponseData,
signatureAlgorithm AlgorithmIdentifier,
signature BIT STRING,
certs EXPLICIT SEQUENCE OF Certificate
}
ResponseData ::= SEQUENCE {
version [0] INTEGER,
nonce INTEGER,
responderID ResponderID,
producedAt GeneralizedTime,
responses SingleResponse,
responseExtensions [1] EXPLICIT Extensions OPTIONAL
}
ResponderID ::= CHOICE {
byName [1] IA5String
}
SingleResponse ::= SEQUENCE {
certificate Certificate,
certStatus CertStatus,
thisUpdate GeneralizedTime,
nextUpdate [0] EXPLICIT GeneralizedTime OPTIONAL,
singleExtensions [1] EXPLICIT Extensions OPTIONAL
}
CertStatus ::= CHOICE {
good [0] IMPLICIT IA5String,
revoked [1] IMPLICIT RevokedInfo,
invalid [2] IMPLICIT InvalidInfo
}
RevokedInfo ::= SEQUENCE {
revocationTime GeneralizedTime,
revocationReason [0] EXPLICIT CRLReason OPTIONAL
}
InvalidInfo ::= ENUMERATED {
unknown (0),
invalidValPolicy (1),
invalidCertPolicy (2),
invalidKeyUsage (3),
invalidTrustedPath (4),
outdatedCertificate (5),
invalidExtKeyUsage (6)
}
Extensions ::= SEQUENCE OF Extension
Extension ::= SEQUENCE {
extnID OBJECT IDENTIFIER,
critical BOOLEAN,
extnValue OCTET STRING
}
CRLReason ::= ENUMERATED {
unspecified (0),
keyCompromise (1),
cACompromise (2),
affiliationChanged (3),
superseded (4),
cessationOfOperation (5),
certificateHold (6),
removeFromCRL (
}
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY
}
CertificateValue ::= SEQUENCE {
oneCertificate Certificate
}
Certificate ::= OCTET STRING
# choose what we want to read
my $structure = $asn->find('SerValResponse');
if ($asn->error ne '') { print "\nError: " . $asn->error; }
if ($structure->error ne '') { print "\nError: " . $structure->error; }
# link data to asn.1 structure
$data_1 = $structure->decode($dataToCheck);
print "\n";
print "Dumper structure";
print" ==================================================\n";
print Dumper ($structure);
print "\nDumper data";
print" ==================================================\n";
print Dumper ($data_1);
# what we want to have : this doesn't work
print "\nresponseStatus ".
$data_1->{'responseStatus'}->{'SerValResponseStatus'} ."\n";
# For tests
print"==================================================\n";
print "structure\n";
asn_dump($structure);
print"==================================================\n";
print "data\n";
asn_dump($data_1);
print"==================================================\n";
print "asn\n";
asn_dump($asn);
print"==================================================\n";
print "dataToCheck\n";
asn_dump($dataToCheck); |
|
| Back to top |
|
 |
patg007 *nix forums beginner
Joined: 02 Jun 2005
Posts: 5
|
Posted: Fri Jun 03, 2005 6:57 am Post subject:
Re: Convert::ASN1 - Decode error
|
|
|
oups on google I can't see your email entirely so...
Pat.
patrick.grenier@gmail.com |
|
| Back to top |
|
 |
patg007 *nix forums beginner
Joined: 02 Jun 2005
Posts: 5
|
Posted: Fri Jun 03, 2005 7:08 am Post subject:
Re: Convert::ASN1 - Decode error
|
|
|
well, thanks google !
they cut email ?? funny...
ok I try this :
patrick.grenier |
|
| Back to top |
|
 |
Robert Jordan *nix forums beginner
Joined: 10 Jun 2005
Posts: 13
|
Posted: Wed Jun 15, 2005 6:56 pm Post subject:
Re: Using Tie in XSUBs
|
|
|
Tassilo,
| Quote: | I read the section "Understanding the Magic of Tied Hashes and
Arrays" of perlguts, but, despite its name, it covers only hashes.
Not that I unterstood it either ;-)
For some things in XS it is best to consult the perl source for
reference, in this case pp_tie().
|
Wow, call me an idiot I didn't realize that AVs are upgraded
with sv_magic() as well. I sorted that out with the help of
the perl sources and of your sample:
/* create AV ref */
AV *ref = newRV_noinc ((SV *) newAV ());
/* tie the AV with the already blessed `obj' */
sv_magic (SvRV (ref), obj, PERL_MAGIC_tied, Nullch, 0);
Thanks!
Rob |
|
| Back to top |
|
 |
Robert Jordan *nix forums beginner
Joined: 10 Jun 2005
Posts: 13
|
Posted: Wed Jun 15, 2005 6:56 pm Post subject:
Re: Using Tie in XSUBs
|
|
|
Tassilo,
| Quote: | I read the section "Understanding the Magic of Tied Hashes and
Arrays" of perlguts, but, despite its name, it covers only hashes.
Not that I unterstood it either ;-)
For some things in XS it is best to consult the perl source for
reference, in this case pp_tie().
|
Wow, call me an idiot I didn't realize that AVs are upgraded
with sv_magic() as well. I sorted that out with the help of
the perl sources and of your sample:
/* create AV ref */
AV *ref = newRV_noinc ((SV *) newAV ());
/* tie the AV with the already blessed `obj' */
sv_magic (SvRV (ref), obj, PERL_MAGIC_tied, Nullch, 0);
Thanks!
Rob |
|
| Back to top |
|
 |
Robert Jordan *nix forums beginner
Joined: 10 Jun 2005
Posts: 13
|
Posted: Wed Jun 15, 2005 6:56 pm Post subject:
Re: Using Tie in XSUBs
|
|
|
Tassilo,
| Quote: | I read the section "Understanding the Magic of Tied Hashes and
Arrays" of perlguts, but, despite its name, it covers only hashes.
Not that I unterstood it either ;-)
For some things in XS it is best to consult the perl source for
reference, in this case pp_tie().
|
Wow, call me an idiot I didn't realize that AVs are upgraded
with sv_magic() as well. I sorted that out with the help of
the perl sources and of your sample:
/* create AV ref */
AV *ref = newRV_noinc ((SV *) newAV ());
/* tie the AV with the already blessed `obj' */
sv_magic (SvRV (ref), obj, PERL_MAGIC_tied, Nullch, 0);
Thanks!
Rob |
|
| Back to top |
|
 |
Robert Jordan *nix forums beginner
Joined: 10 Jun 2005
Posts: 13
|
Posted: Wed Jun 15, 2005 6:56 pm Post subject:
Re: Using Tie in XSUBs
|
|
|
Tassilo,
| Quote: | I read the section "Understanding the Magic of Tied Hashes and
Arrays" of perlguts, but, despite its name, it covers only hashes.
Not that I unterstood it either ;-)
For some things in XS it is best to consult the perl source for
reference, in this case pp_tie().
|
Wow, call me an idiot I didn't realize that AVs are upgraded
with sv_magic() as well. I sorted that out with the help of
the perl sources and of your sample:
/* create AV ref */
AV *ref = newRV_noinc ((SV *) newAV ());
/* tie the AV with the already blessed `obj' */
sv_magic (SvRV (ref), obj, PERL_MAGIC_tied, Nullch, 0);
Thanks!
Rob |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Jul 01, 2005 3:15 am Post subject:
Re: Failing to install IPTables::IPv4 perl module
|
|
|
I got it working without any pbm on another machine with pretty much
same SLES 9 distrib installed. Obviously there is something different
on my first machine. Any idea? |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Thu Dec 04, 2008 12:50 am | All times are GMT
|
|
Bad Credit Mortgages | Loans | Homes for Sale | Loans | Mortgages
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|