note 50980 deleted from ref.pfpro by danbrown
| From: | danbrown@php.net | Date: | Fri, 26 Sep 2008 15:19:14 +0000 |
| Subject: | note 50980 deleted from ref.pfpro by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-144765@lists.php.net to get a copy of this message | ||
Note Submitter: jsbruns at selectionsheet dot com
----
After weeks of searching and trying to install Payflow Pro on Red Hat Enterprise Linux 3, I finally
was able to make it work. Naturally I was very hesitant to recompile my php configuration, but with
a little help from redhat, and about 3 hours, it was installed. I'll try to outline the steps
as best I can.
I'm running RedHat EL 3.0, php-4.3.2, apache 2.0.46.
Anyone running EL 3 is a member of the redhat network, so use up2date to download the latest php
source rpm.
up2date --get-source php (this will download the source rpm into /var/spool/up2date)
rpm -i /var/spool/up2date/php-4.3.2 (or whatever version of php it gives you, installing this source
rpm will not affect your current php configuration)
cd /usr/src/redhat/SPECS
rpmbuild -bp php.spec (unpack the sources and apply patches)
I had a couple of dependency requirements (imap-devel, unixODBC-devel; yours may vary; up2date
'whatever you need'; if you had to install dependant rpms, run rpmbuild -bp php.spec
again)
vi php.spec (edit the spec file and include the --with-pfpro)
on line 285 or 286, you'll see where the ./configure command is generated. Adjust any defaults
as necessary, I didn't need to, and add --with-pfpro=[DIR]. Make sure to place this outside the
if's, I placed mine before ifarch(%ix86).
If you followed the instructions above, and unpacked pfpro into /usr/local, you would add
--with-pfpro=--with-pfpro=/usr/local/verisign/payflowpro/sunsparc, where my version was linuxrh9.
I'm running modssl, my config was --with-pfpro=shared,/usr/local.
Make sure that you have followed php.net's instructions and copied pfpro.h and libpfpro.so to
the appropriate directories.
Now that we've added our config line, build the rpm. You will get a compile error if you have
the incorrect version of the SDK. RedHat EL users should have downloaded the SDK for RedHat 9.x.
rpmbuild -bb php.spec (this will take awhile)
**According to documentation on redhat, new versions of rpm added a feature which causes a build
termination if it finds files not "intended" to be included in the package. Obviously,
since we added pfpro, it wasn't intended to be there. To get around this do the follow:
Edit your php.spec file (same one from earlier), and include
%define _unpackaged_files_terminate_build 0
I added this as the second line under the comments, mine looks like this:
%{!?oracle:%define oracle 0}
%define _unpackaged_files_terminate_build 0
This will allow the build to continue with these unpackaged files.
5 minutes later, if no errors were returned, it should that it build a whole bunch of rpms, all
related to php. Now lets install them.
Redhat recommeded uninstalling existing rpms and installing these new ones, as opposed to using rpm
-Uvh. So, uninstall the cooresponding php rpms. If it complains about dependancies, use --nodeps.
Now, install rpm -i your new ones. You can install them all on the same line if you'd like.
rpm -i php-4.x.x. php-imap-4.x. php-mysql-4.x.x
Done! Now to quote Sean from below:
5) Copy /usr/src/redhat/BUILD/php-X.X.X/build-apache/modules/pfpro.so to /usr/lib/php4.
6) Add "extension=pfpro.so" to /etc/php.d/pfpro.ini using the other .ini files as
templates.
Restart apache, and you should now be able to invoke the Payflow Pro functions!