Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

PayFlow Pro problem

by Anonymous Monk
on Jan 05, 2006 at 23:35 UTC ( [id://521388]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

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!

Replies are listed 'Best First'.
Re: PayFlow Pro problem
by BUU (Prior) on Jan 05, 2006 at 23:58 UTC
    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
by Old_Gray_Bear (Bishop) on Jan 06, 2006 at 01:42 UTC
    Off hand, I'd say that there were errors in both the C<make> and C<make test>, you might want to resolve those and see what happens.

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

    OGB

Re: PayFlow Pro problem
by cbrandtbuffalo (Deacon) on Jan 06, 2006 at 13:47 UTC
    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.

      I think their goal is to provide the possibility of a "local" install of the library, so if you have multiple user accounts on one server all using the payflow pro library, they can each have their own install.

      But, of course, I imagine very few systems include those directories in the path for ldconfig to search.

      So, I used this technique and was still having trouble, until I made sure the directory I was putting libpfpro.so in was getting searched by ldconfig, and then running ldconfig to make the system recognize the existence of the library.

      So, if "make test" works, and "make install" seems to work, but then running "perl test.pl" fails, complaining about being unable to locate libpfpro.so, make sure libpfpro.so is in something like '/usr/lib' or '/usr/local/lib' (and that those directories get indexed by ldconfig ref: /etc/ld.so.conf) and then run ldconfig. You will need root or sudo for that, though.

      Hopefully that will save someone else the hours of frustration and anger I had yesterday. :-\

      OTOH: now I know way more about Makefile.PL internals and ld.so than I did two days ago.
      Thanks. I made these changes to the Makefile.PL and it worked.
      --TWH
Re: PayFlow Pro problem
by philcrow (Priest) on Jan 06, 2006 at 14:00 UTC
    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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://521388]
Approved by McDarren
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-03-28 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found