PayFlow Pro problem
Anonymous Monk
created: 2006-01-05 18:35:16
A script of mine that uses the PayFlow Pro module is failing with the following error:
Can't load '/usr/local/lib/perl5/site_perl/5.6.2/i686-linux/auto/PFProAPI/PFProAPI.so' for module PFProAPI: libpfpro.so: cannot open shared object file: No such file or directory at /usr/local/lib/perl5/5.6.2/i686-linux/DynaLoader.pm line 206.
I installed the PayFlow Pro module with:
sudo perl Makefile.PL
sudo make
sudo make test
sudo make install
What might be going wrong?
Thanks!
Re: PayFlow Pro problem
BUU
created: 2006-01-05 18:58:12
libpfpro.so: cannot open shared object file: No such file or directory
You need this file. It's probably in a "payflow pro" library.
Re: PayFlow Pro problem
created: 2006-01-05 20:42:18
Off hand, I'd say that there were errors in both the C and C, you might want to resolve those and see what happens.

----
I Go Back to Sleep, Now.

OGB

Re: PayFlow Pro problem
created: 2006-01-06 08:47:02
Basically, the problem is what the error says. The module can't find that file, so it can't load it. The makefile for this module is a bit strange, and it puts things in strange places.

Normally I avoid messing directly with a Makefile.PL, but in this case I had to. If you look at the code in Makefile.PL, you'll see they try to play games with the various libs where things are installed. Depending on where you run the install and how your system is configured, it may or may not put things in the correct place.

My solution was to modify the $LIBS variable they set at the top of the Makefile.PL. The original looks like:

my $LIBS = '-L./lib -L. -lpfpro -lMSVCRT ';
I changed it to:
my $libdir = "/dir/to/install/stuff";
my $LIBS = "-L$libdir -lpfpro -lMSVCRT ";
Assuming that directory exists and you can write to it, you can follow through the rest of the file and make these changes:
< mkdir("lib",0744);
---
> # mkdir("lib",0744);

<     copy("../lib/$file","lib/$file");
---
>     copy("../lib/$file","$libdir/$file");

<     chmod($m,"lib/$file");
<     if ( !(-e "lib/$file") ) {
---
>     chmod($m,"$libdir/$file");
>     if ( !(-e "$libdir/$file") ) {
I admit this is less than elegant, but I couldn't figure out what they were trying to do and this got things working for me.

Good luck.

Re^2: PayFlow Pro problem
created: 2006-01-06 12:38:00
Thanks. I made these changes to the Makefile.PL and it worked.
--TWH
Re: PayFlow Pro problem
created: 2006-01-06 09:00:52
I recently installed payflow. I located libpfpro.so on my system and then set the LD_LIBRARY_PATH to include it. That path ended up with the directory containing libpfpro.so, /lib, and /usr/lib. I also had to set the PFPRO_CERT_PATH environment variable to the directory where the cert lives (hint the .so file is in a directory which is a sybling of the directory where the cert lives.)

Phil

perlmonks.org content © perlmonks.org and Anonymous Monk, BUU, cbrandtbuffalo, Old_Gray_Bear, philcrow

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03