[24254] in Perl-Users-Digest
Perl-Users Digest, Issue: 6445 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 22 18:05:44 2004
Date: Thu, 22 Apr 2004 15:05:11 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 22 Apr 2004 Volume: 10 Number: 6445
Today's topics:
Re: .plx <apollock11@hotmail.com>
Re: activeperl + -T option <brian_helterline@hp.com>
ANNOUNCE Test::MultiFork 0.3 <muir@idiom.com>
ANNOUNCE: IO::Event version 0.503 <muir@idiom.com>
Re: Asking for comments on this script <Jon.Ericson@jpl.nasa.gov>
AuthorizeNet gateway AIM implementation and crypt-sslea <johnrowell@earthlink.net>
Re: AuthorizeNet gateway AIM implementation and crypt-s <Eps@nospam.com>
Re: cgi.pm <clydenospamorham@nospamorhamgetofftheline.freeservenospamorham.co.uk>
Re: connecting to mysql <xx087@freenet.carleton.ca>
Re: connecting to mysql <tore@aursand.no>
Re: connecting to mysql (user99)
Re: connecting to mysql <xx087@freenet.carleton.ca>
Re: connecting to mysql <tadmc@augustmail.com>
Re: connecting to mysql <spamtrap@dot-app.org>
Re: connecting to mysql (Sam Holden)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 22 Apr 2004 13:34:06 -0700
From: Arvin Portlock <apollock11@hotmail.com>
Subject: Re: .plx
Message-Id: <c69a80$2ghb$1@agate.berkeley.edu>
Robin wrote:
> What's the difference between .plx and .pl when used with cgi?
Assuming you're running on a Windows machine with IIS as
your webserver and you did the default ActiveState perl
install, the difference should be mostly transparent to
you. You should have had PerlIS installed by default and
the .plx extension mapped to it. So when you write cgi
scripts, just use .plx as the extension and they will auto-
matically run much faster.
If you *didn't* use the default ActiveState install options
then good luck. Unless you do this sort of thing all the time
it's holy hell to get perl and perlIS to work with IIS.
------------------------------
Date: Thu, 22 Apr 2004 12:13:38 -0700
From: "Brian Helterline" <brian_helterline@hp.com>
Subject: Re: activeperl + -T option
Message-Id: <408819ac$1@usenet01.boi.hp.com>
"Robin" <robin @ infusedlight.net> wrote in message
news:c63mu9$6fe$1@reader2.nmix.net...
> > "Robin" <robin @ infusedlight.net> wrote in message
> > news:c62hsr$qci$1@reader2.nmix.net...
> > > I am running active perl 8.2.3 Build 809 and I'm wondering why when I
> turn
> > > on taint mode checking on the #!/usr/bin/perl line whenver I run the
> > script
> > > it gives me an error "Too late for -T option at bbs.pl line 1." and
> > whenever
> > > I run the script with perl -T bbs.pl it works fine
> >
> > You have not said which platform you are running on.
> > What you hint at should behave correctly on most UNIX systems.
> > There are several well documented bugs in how DROSS and Windoze systems
> > invoke Perl programs . . .
>
> > > ....is there any
> > > configuration file I can edit so perl will automatically understand it
> to
> > be
> > > run with a -T option? I want to run the script with a Perl IDE that
I've
> > > downloaded and it gives me this error unless I take out the -T option.
> Do
> > I
> > > have to take out the -T evertime I run the script with the IDE or is
> there
> > > something I can do?
>
>
> >
> > I guess you could hard-wire "-T" into the Perl command line associated
> with
> > extension ".pl", but that would impose taint checking everywhere, which
> > would give you headaches.
>
> I was thinking the exact same thing...thanks.
>
Another solution is to have your CGI scripts end with .cgi rather than .pl
and then create the association of .cgi to perl with -T enabled. This
forces all cgi scripts to be run with -T while normal perl scripts (.pl) are
not.
--
brian
------------------------------
Date: Wed, 21 Apr 2004 22:46:47 GMT
From: David Muir Sharnoff <muir@idiom.com>
Subject: ANNOUNCE Test::MultiFork 0.3
Message-Id: <HwL6Ew.ADy@zorch.sf-bay.org>
You can find this in CPAN at
http://www.cpan.org/authors/id/MUIR/modules/Test-MultiFork-0.3.tar.gz
or (until CPAN picks it up) at
ftp:://ftp.idiom.com/users/muir/CPAN/modules/Test-MultiFork-0.3.tar.gz
I'm using Test::MultiFork activly in development. It works well enough
that other people can try it now :-)
-Dave
...CHANGELOG......................................................
Requires the new release of IO::Event
Regression test fixes.
Documentation fixes
...POD............................................................
NAME
Test::MultiFork - Test suite support for multi-process programs
SYNOPSIS
use Test::MultiFork;
($name, $letter, $number) = procname([new name])
lockcommon()
@oldvalues = getcommon()
setcommon(@newvalues)
unlockcommon()
use Test::MultiFork qw(groupwait setgroup dofork stderr bail_on_bad_plan)
groupwait([$tag])
$oldgroup = setgroup([$newgroup])
dofork(fork_specification)
DESCRIPTION
This test module is to support creating test suites for programs and
modules that run as multiple processes and do mostly blocking I/O.
Test::MultiFork handles the forking so that it can set up each child to
coordinate the output. The output from each child fork is redirected to
the parent. Each fork produces normal test output -- possibly using
normal test modules like Test::Simple. The output is collected and
rewritten by the parent process.
Each child fork has a letter and number designation. The forks are
created by "dofork()". Dofork takes a specifiction on the form:
([a-z](\d*))+. That is to say, one or more lower-case letters, each
optionally followd by a number. The number says how many children to
fork for that letter (default one). The specifier "ab2c3" means have one
"a" child (numbered 1); two "b" children (numbered 1, 2); and three "c"
children (numbered 1, 2, 3).
To aid in writing tests, Test::MultiFork will pass data between the
child processes. The data is test-writer defined.
SOURCE FILTER
Test::MultiFork acts as a source filter on your code. It does this so
that it can do lock-step execution control.
The source filtering is controlled with pseudo labels. The labels must
be the only thing on the line. The main source control is a label like
"FORK_abc:". This label tells Test::MultiFork how many times to fork
(see above). Whatever comes after the "FORK_" and before the ":" is a
fork specifier.
With a "FORK_abc:" label, varient execution labels are enabled. Varient
execution labels must be all lowercase. This is to allow you to use
something different for you loop control labels. This module can be used
without putting in any special labels.
Outside of a function, a varient execution label will synchronize all
the program forks to that line of code. As each fork reaches that line,
it will stop and wait until all forks get there. At that point, all of
the forks will start up and run again.
Inside or outside of a function, once a varient execution labels is
seen, source code is turned on or off (commented out) depending on if
the process fork letter is in the label.
For example:
# let's fork 5 times
FORK_abc2d:
ab:
print "I'm an 'a' or 'b' process\n";
cd:
print "I'm an 'c' or 'd' process\n";
abcd:
print "we are all running in lockstep\n";
sub xyz {
a:
print "only a does something in this function\n";
abcd:
}
Since the processes run in lockstep (synchronized at the labels), loop
controls must cover all processes.
In addition to fork() and the varient execution labels, you can override
a default signal selection for debugging. By default the "USR1" signal
is used to aid debugging: if the parent process bails out, it will send
"USR1" signals to all the children to ask them to print out some
diagnostics. The special label "SIGNAL_xyz:" changes which signal to
use. Substitute "xyz" with your choice of signal or "none" to disable
this feature.
IMPORTS
stderr
Import 'stderr' to send the STDERR output from each fork through the
parent for tagging. The default is to leave STDERR alone.
bail_on_bad_plan
Bail out if a test plan isn't followed. This is most useful as a way to
exit early if one of the fork()ed children exits early.
colorize
If "$ENV{TERM} =~ /xterm/", then escape codes will be printed to change
the background and foreground text colors so that each fork()ed child
has a different color scheme.
FUNCTIONS
lockcommon()
Sets a lock on the shared common data.
getcommon()
Returns the current value of the common data. The common data is an
array. In scalar context, the first element is returned. getcommon does
not care if the common data is locked.
setcommon(@newvalues)
Sets the value of the common data to the new values. Dies if common data
lock isn't held.
unlockcommon()
Releases a lock on the shared common data. Dies if the lock isn't
already held.
groupwait([$tag])
Wait for all process forks in the process group to get reach this same
synchronization point as designated by the $tag. The default tag is the
current source file name and line number. All processes start in the
"default" group. This is the function used to implement the varient
execution lockstep synchronization.
setgroup([$newgroup])
With a $newgroup, changes the process' group identity. All processes
start in group "default". Returns the old group name.
dofork($fork_specification)
Fork off children processes. The parent process becomes the
special-purpose test coordinator. The specification is as detailed in
the DESCRIPTION above.
INTEGRATION WITH TEST::*
Test::Simple and Test::More encourage you to specify a test plan at
compile time. Make sure that dofork() is called before the test plan is
specified.
When using Test::MultiFork's source filter in conjunction with
Test::Builder anything built on top of it (eg: Test::Simple or
Test::More) put Test::MultiFork first in the "use" list.
SEE ALSO
Test::Harness Test::Builder Test::Simple Test::More Test
BUGS
This is new and bearly tested. Please provide feedback!
LICENSE
Copyright (C) 2003 David Muir Sharnoff <muir@idiom.com>. This module may
be used/copied/etc on the same terms as Perl itself.
--
------------------------------
Date: Wed, 21 Apr 2004 22:28:48 GMT
From: David Muir Sharnoff <muir@idiom.com>
Subject: ANNOUNCE: IO::Event version 0.503
Message-Id: <HwL6F4.AEn@zorch.sf-bay.org>
You can find this in CPAN at
http://www.cpan.org/authors/id/MUIR/modules/IO-Event-0.503.tar.gz
or (until CPAN picks it up) at
ftp:://ftp.idiom.com/users/muir/CPAN/modules/IO-Event-0.503.tar.gz
I'm using IO::Event activly in development. I am not yet using
it in production. The code is getting stable and is good enough
for users other than myself.
-Dave
...CHANGELOG......................................................
Bugfix: eof was falsing positive
Bugfix: partial lines were being returned for <$ieo>
...POD............................................................
NAME
IO::Event - Tied Filehandles for Nonblocking IO with Object Callbacks
DESCRIPTION
IO::Event provides a object-based callback system for handling
nonblocking IO. The design goal is to provide a system that just does
the right thing w/o the user needing to think about it much.
All APIs are kept as simple as possible yet at the same time, all
functionality is accesible if needed. Simple things are easy. Hard
things are possible.
Most of the time file handling syntax will work fine: "<$filehandle>"
and "print $filehandle 'stuff'".
After initial setup, call "Event::loop()". The callbacks are dispatched
through Event.
CONSTRUCTORS
IO::Event->new($filehandle, $handler)
The basic "new" constructor takes a filehandle and returns a
psuedo-filehandle. Treat the IO::Event object as a filehandle. Do
not use the original filehandle without good reason (let us know if
you find a good reason so we can fix the problem).
The handler is the class or object where you provide callback
functions to handle IO events. It defaults to the package of the
calling context.
IO::Event::Socket::INET->new( [ARGS] )
This constructor uses IO::Socket::INET->new() to create a socket
using the ARGS provided. It returns an IO::Event object.
The handler defaults as above or can be set with an additional
pseudo-parameter for IO::Socket::UNIX->new(): "Handler". A
description for the socket can be provided with an additional
psuedo-parameter: "Description".
IO::Event::Socket::UNIX->new( [ARGS] )
This constructor uses IO::Socket::UNIX->new() to create a socket
using the ARGS provided. It returns an IO::Event object.
The handler defaults as above or can be set with an additional
pseudo-parameter for IO::Socket::UNIX->new(): "Handler". A
description for the socket can be provided with an additional
psuedo-parameter: "Description".
MANDATORY HANDLERS
These handler methods must be available in the handler object/class if
the situation in which they would be called arises.
ie_input($handler, $ioe, $input_buffer_reference)
Invoked when there is fresh data in the input buffer. The input can
be retreived via directly reading it from $$input_buffer_reference
or via "read()" from the $ioe filehandle, or by using a variety of
standard methods for getting data:
<$ioe> like IO::Handle
$ioe->get() like Data::LineBuffer
$ioe->read() like IO::Handle
$ioe->sysread() like IO::Handle
$ioe->getline() like IO::Handle
$ioe->getlines() like IO::Handle
$ioe->getsome() see below
$ioe->ungets() like FileHandle::Unget
At end-of-file, ie_input will only be invoked once. There may or may
not be data in the input buffer.
ie_connection($handler, $ioe)
Invoked when a listen()ing socket is ready to accept(). It should
call accept:
sub ie_connection
{
my ($ioe) = @_;
my $newfh = $ioe->accept()
}
ie_read_ready($handler, $underlying_file_handle)
If autoreading is turned off then this will be invoked.
ie_werror($handler, $output_buffer_reference)
A write error has occured when trying to drain the write buffer.
Provide an empty subroutine if you don't care.
OPTIONAL HANDLERS
These handler methods will be called if they are defined but it is not
required that they be defined.
ie_eof($handler, $ioe, $input_buffer_reference)
This is invoked when the read-side of the filehandle has been closed
by its source.
ie_output
This is invoked when data has just been written to the underlying
filehandle.
ie_outputdone
This is invoked when all pending data has just been written to the
underlying filehandle.
ie_connected
This is invoked when a "connect()" completes.
ie_connect_timeout
This is invoked when a "connect()" attempt times out.
ie_died($handler, $ioe, $method, $@)
If another handler calls "die" then ie_died will be called with the
IO::Event object, the name of the method just invoked, and the die
string. If no ie_died() callback exists then execution will
terminate.
ie_timer
This is invoked for timer events. These will only arise if set using
thing underlying Event object.
ie_exception
Invoked when an exceptional condition arises on the underlying
filehandle
ie_outputoverflow($handler, $ioe, $overflowing,
$output_buffer_reference)
Invoked when there is too much output data and the output buffers
are overflowing. You can take some action to generate less output.
This will be invoked exactly once (with $overflowing == 1) when
there is too much data in the buffer and then exactly once again
(with $overflowing == 0) when there is no longer too much data in
the buffer.
METHODS
In addition to methods described in detail below, the following methods
behave like their "IO" (mostly "IO::Socket") counterparts (except for
being mostly non-blocking...):
connect
listen
open
read
sysread
syswrite
print
eof
Through AUTOLOAD (see the SUBSTITUTED METHODS section) methods are
passed to underlying "Event" objects:
loop
unloop
and many more...
Through AUTOLOAD (see the SUBSTITUTED METHODS section) methods are
passed to underlying "IO" objects:
fileno
stat
truncate
error
opened
untaint
and many more...
IO::Event defines its own methods too:
->accept($handler)
accept() is nearly identical to the normal IO::Socket::accept()
method except that instead of optionally passing a class specifier
for the new socket, you optionally pass a handler object or class.
The returned filehandle is an IO::Event object.
->can_read($amount)
Returns true if $amount bytes worth of input is available for
reading. Note: this does not return true at EOF so be careful not to
hang forever at EOF.
->getsome($amount)
Returns $amount bytes worth of input or undef if the request can't
be filled. Returns what it can at EOF.
->get()
get() is like getline() except that it pre-chomp()s the results and
assumes the input_record_separator is "\n". This is like get() from
Data::LineBuffer.
->unget()
Push chomp()ed lines back into the input buffer. This is like
unget() from Data::LineBuffer.
->ungetline(), ->xungetc(), ->ungets()
This is what ungetc() should be: it pushes a string back into the
input buffer. This is unlike IO::Handle->ungetc which takes an
ordinal and pushes one character back into the the input buffer.
->handler($new_handler)
Sets the handler object/class if $new_handler is provided. Returns
the old handler.
->filehandle()
Returns the underlying "IO::Handle".
->event()
Returns the underling "Event".
->listener($listening)
Used to note that a filehandle is being used to listen for
connections (instead of receiving data). A passed parameter of 0
does the opposite. Returns the old value. This is mostly used
internally in IO::Event.
->input_record_separator($new_sep)
IO::Handle doesn't allow input_record_separator's on a per
filehandle basis. IO::Event does. If you don't ever set a
filehandle's input record separator, then it contineously defaults
to the current value of $/. If you set it, then it will use your
value and never look at $/ again.
->readevents($readevents)
Get/set listening for read-ready events on the underlying
filehandle. This could be used by ie_outputoverflow to control input
flows.
->output_bufsize($output_bufsize)
Get/set the size of the output buffer.
->autoread($autoread)
Get/set automatic reading if data when data can be read. Without
autoread turned on, the input buffer ins't filled and none of the
read methods will work. The point of this is for working with
non-data filehandles. This is an experts-only method that kinda
defeats the purpose of this module. This would be necessary using
recv() to get data.
->drain()
Used to start looking for write-ready events on the underlying
filehandle. In normal operation this is handled automatically.
->reentrant($reentrant)
Get/set reentrant callbacks. By default, IO::Event avoids making
reentrant callbacks. This is good because your code is less likely
to break. This is bad because you won't learn about things right
away. For example, you will not learn the the output buffer is
overflowing during print(). You'll have to wait for the output
buffer to begin draining to find out. This could be a problem.
->close()
If there is output buffered, close will be delayed until the output
buffer drains.
->forceclose
Close close immediately, even if there is output buffered.
SUBSTITUED METHODS
Any method invocations that fail because the method isn't defined in
IO::Event will by tried twice more: once using trying for a method on
the inner (hidden) filehandle and once more trying for a method on the
Event object that's used to create the select loop for this module.
EXAMPLE SERVER
# This is a tcp line echo server
my $listener = IO::Event::Socket::INET->new(
Listen => 10,
Proto => 'tcp',
LocalPort => 2821,
);
Event::loop();
sub ie_connection
{
my ($pkg, $lstnr) = @_;
my $client = $lstnr->accept();
printf "accepted connection from %s:%s\n",
$client->peerhost, $client->peerport;
}
sub ie_input
{
my ($pkg, $client, $ibufref) = @_;
print $client <$client>;
}
SYSREAD and EOF
sysread() is incompatable with eof() because eof() uses getc(). Most of
the time this isn't a problem. In other words, some of the time this is
a problem: lines go missing.
For this reason, IO::Event never uses sysread(). In fact, if you ask it
to do a sysread() it does a read() for you instead.
On the other hand, at the current time no problems with syswrite have
come to light and IO::Event uses syswrite and never any other form of
write/print etc.
DATA STRUCTURE
The filehandle object itself is a funny kind of hash reference. If you
want to use it to store your own data, you can. Please don't use hash
keys that begin "ie_" or "io_" as those are the prefixes used by
"IO::Event" and "IO::Socket".
The syntax is kinda funny:
${*$filehandle}{'your_hash_key'}
SEE ALSO
The following perl modules do something that is kinda similar to what is
being done here:
IO::Multiplex
IO::NonBlocking
IO::Select
Event
POE
POE::Component::Server::TCP
Net::Socket::NonBlock
Net::Server::Multiplex
NetServer::Generic
The API borrows most heavily from IO::Multiplex. IO::Event uses Event.pm
and thus can be used in programs that are already using Event or POE.
BUGS
This code is still greenish. The test suite only covers 40% of the code.
Nothing sane is done with excptional conditions. What causes them
anyway?
LICENSE
Copyright (C) 2002-2004 David Muir Sharnoff <muir@idiom.com>. This
module may be used/copied/etc on the same terms as Perl itself.
--
------------------------------
Date: Thu, 22 Apr 2004 13:44:05 -0700
From: Jon Ericson <Jon.Ericson@jpl.nasa.gov>
Subject: Re: Asking for comments on this script
Message-Id: <rcgd65zeoa2.fsf@Jon-Ericson.sdsio.prv>
Rafael Villarroel Flores <rvf_lists@fastmail.fm> writes:
> \makeatletter
<snip>
> \makeatother
Other people have given you perl style advice, but I wanted to mention
a couple of LaTeX hints. Using \makeatletter in a document is a good
sign that you should write a document class or package.
> sub printboard
> {
> print OUT "\n\n\\smallskip\n".
> "\\needspace{50pt}\n".
> "\\begin{wrapfigure}[8]{r}{78pt}\n".
> "\\showboard\n".
> "\\end{wrapfigure}\n";
> }
It would be easier to write a LaTeX macro for this[1]:
\newcommand{\printboard}
{
\smallskip
\needspace{50pt}
\begin{wrapfigure}[8]{r}{78pt}
\showboard
\end{wrapfigure}
}
As a bonus, the LaTeX source would be much easier to read.
This seems like an excellent opportunity to use PerlTeX[2]. From the
abstract:
PerlTEX is a combination Perl script (perltex) and LATEX2" style
file (perlmacros) that, together, give the user the ability to
define LATEX macros in terms of Perl code. Once defined, a Perl
macro becomes indistinguishable from any other LATEX macro. PerlTEX
thereby combines LATEX˘s typesetting power with Perl˘s
programmability.
Basically this would this would turn your script inside out, much like
a template solution. You include perl code within your LaTeX
document[3]:
\perlnewcommand{\fixvariation}[1]
{ $_=$_[0];
#{{{{{{{{{{{{{{{{ Make sure the curlies balance.
s/\({/{/g;
s/}/}\(/g;
s/{/\\textit{\[/g;
s/}/\]}/g;
s/\[ /\[/g;
s/ \]/\]/g;
s/\(/ \\movecomment{/g;
s/\)/}\n/g;
s/}\n \\textit{/} \n\n \\textit{/g;
s/ }/}/g;
s/\$18}/}\\wdecisive/g;
s/\$16}/}\\wupperhand/g;
s/\$14}/}\\wbetter/g;
s/\$19}/}\\bdecisive/g;
s/\$17}/}\\bupperhand/g;
s/\$15}/}\\bbetter/g;
s/\$10}/}\\equalp/g;
return $_;
}
And you would use something like:
\fixvariation{{7:+0.42} 10. ... c6 11. O-O-O
$14) ({0:+0.00} 10. ... dxc4 $10)}
Jon
Footnotes:
[1] This code is *untested*.
[2] Available at www.ctan.org (note the `t').
[3] I did do some testing on this macro. It takes a bit of fiddling
to get everything right, but not as much as I expected. The
important thing, as far as I can tell, is to make sure the
curlies balance. I don't have the chess packages, so I can't help
with those.
------------------------------
Date: Thu, 22 Apr 2004 16:08:25 GMT
From: "John Rowell" <johnrowell@earthlink.net>
Subject: AuthorizeNet gateway AIM implementation and crypt-ssleay questions
Message-Id: <Z5Shc.4876$eZ5.4153@newsread1.news.pas.earthlink.net>
Hi,
I have been processing credit cards through my website using the
Authorize.net SIM system for quite a while. But now I have purchased a
secure certificate and want to let customers fill out their credit card
details on my website's secure server. Authorize.net told me this would
require switching to their AIM system. My website is hosted by a hosting
provider on a virtual server. I do have some areas of the website secured by
an ssl certificate. My question is how to submit credit card info from my
website to Authorize.net without using their own form on their server. I
searched the web for "perl https post" and found
http://forums.devshed.com/t16872/s.html which has a short sample script but
states that it requires crypt-ssleay to be installed. Is this something I
can install myself -- is it as simple as installing a perl script or
module -- or do I need to ask my hosting provider to do it? Also where can I
find this "crypt-ssleay" module to download it? My hosting provider is using
the latest version of Red Hat Linux -- is it possible it's already
installed? Any help would be much appreciated.
Thanks,
John
------------------------------
Date: Thu, 22 Apr 2004 20:45:00 GMT
From: Epsilon <Eps@nospam.com>
Subject: Re: AuthorizeNet gateway AIM implementation and crypt-ssleay questions
Message-Id: <Xns94D38BE568A2BEpsnospamcom@68.6.19.6>
John, I just recently setup an Authorize.net AIM account for a client of
mine. Although I programmed it in PHP, Perl works just as well. Their
support dept. told me they had sample scripts that they would provide
for free. I started with their PHP AIM script and simply customized it
to my needs. It works perfect.
Also in their support section they have a PDF with very detailed
instructions on how the gateway works, how to submit data, and how to
figure out what the response string means.
It's the AIM Implementation Guide, which you can download at:
http://www.authorizenet.com/support/guides.php
As for crypt-ssleay, I don't recall that being required in any of the
documentation I read. Not for the script they provided, anyway. But if
it is I think that's something your host would need to handle.
"John Rowell" <johnrowell@earthlink.net> wrote in
news:Z5Shc.4876$eZ5.4153@newsread1.news.pas.earthlink.net:
> Hi,
>
> I have been processing credit cards through my website using the
> Authorize.net SIM system for quite a while. But now I have purchased a
> secure certificate and want to let customers fill out their credit
> card details on my website's secure server. Authorize.net told me this
> would require switching to their AIM system. My website is hosted by a
> hosting provider on a virtual server. I do have some areas of the
> website secured by an ssl certificate. My question is how to submit
> credit card info from my website to Authorize.net without using their
> own form on their server. I searched the web for "perl https post" and
> found http://forums.devshed.com/t16872/s.html which has a short sample
> script but states that it requires crypt-ssleay to be installed. Is
> this something I can install myself -- is it as simple as installing a
> perl script or module -- or do I need to ask my hosting provider to do
> it? Also where can I find this "crypt-ssleay" module to download it?
> My hosting provider is using the latest version of Red Hat Linux -- is
> it possible it's already installed? Any help would be much
> appreciated.
>
> Thanks,
>
> John
>
>
>
>
------------------------------
Date: Thu, 22 Apr 2004 19:15:58 +0100
From: "Clyde Ingram" <clydenospamorham@nospamorhamgetofftheline.freeservenospamorham.co.uk>
Subject: Re: cgi.pm
Message-Id: <mZThc.2$O_.0@newsfe5-gui.server.ntli.net>
"Robin" <robin @ infusedlight.net> wrote in message
news:c655kv$s58$1@reader2.nmix.net...
> What are the easter eggs in cgi.pm... ? I must ask.
Oh, alright then, Webmaster Robin, come out of your shell and break it to
us: What are the easter eggs in cgi.pm?
------------------------------
Date: 22 Apr 2004 15:23:53 GMT
From: Glenn Jackman <xx087@freenet.carleton.ca>
Subject: Re: connecting to mysql
Message-Id: <slrnc8fosc.nel.xx087@smeagol.ncf.ca>
user99 <user99@austin.rr.com> wrote:
> can't get this script to work. running mysql server on
> windows 2000 and i granted all to ''@'localhost'.
> any ideas?
[...]
> my $dbh = DBI->connect('DBI:mysql:database01:localhost','','');
^^^^^^^^^^ ^^^^^^^^^
That looks wrong. Try
my $dsn = 'DBI:mysql:database=database01:host=localhost';
my $options = {RaiseError => 1};
my $dbh = DBI->connect($dsn, '', '', $options);
Read 'perldoc DBD::mysql' (online at
http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm)
--
Glenn Jackman
NCF Sysadmin
glennj@ncf.ca
------------------------------
Date: Thu, 22 Apr 2004 19:51:37 +0200
From: Tore Aursand <tore@aursand.no>
Subject: Re: connecting to mysql
Message-Id: <pan.2004.04.22.17.50.52.167853@aursand.no>
On Thu, 22 Apr 2004 15:23:53 +0000, Glenn Jackman wrote:
>> my $dbh = DBI->connect('DBI:mysql:database01:localhost','','');
>> ^^^^^^^^^^ ^^^^^^^^^
> That looks wrong. Try
> my $dsn = 'DBI:mysql:database=database01:host=localhost';
Hmm. That _also_ looks wrong. Shouldn't the values be separated by a
semi-colon? In other words, something like this?
my $dns = 'DBI:mysql:database=dbname;host=dbhost;port=dbport';
Or is it possible to use both colon and semi-colon?
--
Tore Aursand <tore@aursand.no>
"I know not with what weapons World War 3 will be fought, but World War
4 will be fought with sticks and stones." (Albert Einstein)
------------------------------
Date: 22 Apr 2004 11:20:48 -0700
From: user99@austin.rr.com (user99)
Subject: Re: connecting to mysql
Message-Id: <a16bd472.0404221020.72a64aef@posting.google.com>
Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in message news:<c68j8m$9a3jj$1@ID-184292.news.uni-berlin.de>...
> user99 wrote:
> > can't get this script to work. running mysql server on windows
> > 2000 and i granted all to ''@'localhost'.
> > any ideas?
>
> Yes, make some debugging efforts, such as capturing the error
> message(s). Study the DBI docs for guidance.
>
> "can't get this script to work" is a terribly unappropriate problem
> description. You should study the posting guidelines for this group:
> http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
ok, mr wise guy... This is what I get on the log when I run:
<-Can't create TCP/IP socket (10106) error 2004 recorded: Can't create
TCP/IP socket.
The thing is if I run a similar version on dos it works, but when I
run
it as a cgi on tomcat it craps out....
thank you very much for your useless help.
------------------------------
Date: 22 Apr 2004 18:53:30 GMT
From: Glenn Jackman <xx087@freenet.carleton.ca>
Subject: Re: connecting to mysql
Message-Id: <slrnc8g55d.nel.xx087@smeagol.ncf.ca>
Tore Aursand <tore@aursand.no> wrote:
> On Thu, 22 Apr 2004 15:23:53 +0000, Glenn Jackman wrote:
> >> my $dbh = DBI->connect('DBI:mysql:database01:localhost','','');
>
> > That looks wrong. Try
> > my $dsn = 'DBI:mysql:database=database01:host=localhost';
>
> Hmm. That _also_ looks wrong. Shouldn't the values be separated by a
> semi-colon? In other words, something like this?
>
> my $dns = 'DBI:mysql:database=dbname;host=dbhost;port=dbport';
>
> Or is it possible to use both colon and semi-colon?
Ah, my mistake. 'host' is preceded by a semi-colon.
--
Glenn Jackman
NCF Sysadmin
glennj@ncf.ca
------------------------------
Date: Thu, 22 Apr 2004 13:41:57 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: connecting to mysql
Message-Id: <slrnc8g4fl.41t.tadmc@magna.augustmail.com>
user99 <user99@austin.rr.com> wrote:
> Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in message news:<c68j8m$9a3jj$1@ID-184292.news.uni-berlin.de>...
>> user99 wrote:
>> > can't get this script to work.
>> "can't get this script to work" is a terribly unappropriate problem
>> description.
> ok, mr wise guy...
So long mister foolish guy.
*plonk*
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 22 Apr 2004 16:47:26 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: connecting to mysql
Message-Id: <WpednQSL_OHDshXdRVn-vA@adelphia.com>
user99 wrote:
> ok, mr wise guy... This is what I get on the log when I run:
> <-Can't create TCP/IP socket (10106) error 2004 recorded: Can't create
> TCP/IP socket.
This shows that Gunnar was correct about a number of things. First, that you
need to brush up on your debugging skills; this is clearly not an "Access
Denied" message from the MySQL server, so there's no logical reason to
believe that any sort of grant would fix it.
Also, Gunnar was correct in asking for more information. This error message
is much more informative than "it doesn't work." Without this information,
anyone who wants to help you is limited to offering blind (and most likely
unhelpful) guesses.
Here is a useful article:
<http://www.catb.org/~esr/faqs/smart-questions.html>
> thank you very much for your useless help.
Unfortunately, with that sort of attitude, I don't think you'll find too
many people here who are still willing to help you. Do you always respond
to kindness with insults?
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
------------------------------
Date: 22 Apr 2004 21:58:26 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: connecting to mysql
Message-Id: <slrnc8gg02.8to.sholden@flexal.cs.usyd.edu.au>
On 22 Apr 2004 11:20:48 -0700, user99 <user99@austin.rr.com> wrote:
> Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in message news:<c68j8m$9a3jj$1@ID-184292.news.uni-berlin.de>...
>> user99 wrote:
>> > can't get this script to work. running mysql server on windows
>> > 2000 and i granted all to ''@'localhost'.
>> > any ideas?
>>
>> Yes, make some debugging efforts, such as capturing the error
>> message(s). Study the DBI docs for guidance.
>>
>> "can't get this script to work" is a terribly unappropriate problem
>> description. You should study the posting guidelines for this group:
>> http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
>
> ok, mr wise guy... This is what I get on the log when I run:
><-Can't create TCP/IP socket (10106) error 2004 recorded: Can't create
> TCP/IP socket.
>
> The thing is if I run a similar version on dos it works, but when I
> run
> it as a cgi on tomcat it craps out....
>
> thank you very much for your useless help.
Thank you for helping reduce the number of posts I need to read in this
newsgroup to find the good ones.
--
Sam Holden
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 6445
***************************************