[php] module compilation:Payflow Pro Verisign

I have my php already compiled and working perfectly, but I found that pfpro module was not compiled in.

I needed pfpro module, but I didn’t want to mess up with whole php recompilation…

First download linux SDK kit from verisign website. You need to create an account with verisign first.

Unzip/untar into /var/www/pfpro

So I decided with creating self-contained pfpro module.

1. make a directory and cd into it.
$mkdir mydir
$cd mydir

2. copy all files from php_source_dir/ext/pfpro to the new dir

$cp -rp /usr/src/redhat/SOURCES/php-x.x.x/ext/pfpro/* .

3. if you are using redhat, you need to install php-devel rpm package
Run

$phpize

4. Run
(php-config resides /usr/bin with redhat RPM, so you don't
need --with-php-config. /usr/bin is already in ENV)

$./configure --with-pfpro=shared,/var/www/pfpro/lib \
[--with-php-config=/path/to/php-config]

5. $make

6. $cp ./modules/pfpro.so /usr/lib/php4

7. insert below line into /etc/php.ini

extension=pfpro.so

8. restart httpd server

9. check with phpinfo()

NOTE: When you actaully code the php, you need to set environment variable n the php file before connecting to verisign. Of course you must provide the correct path.
putenv(“PFPRO_CERT_PATH=/var/www/pfpro/certs”);

Read More

[php] Installing addtional modules separately

Please refer to README.SELF-CONTAINED-EXTENSIONS from the original source distribution

—-from the readme file—-

Just to show you how easy it is to create a self-contained
extension, we will convert an embedded extension into a
self-contained one. Install PHP and execute the following
commands.

$ mkdir /tmp/newext
$ cd /tmp/newext

You now have an empty directory. We will copy the files from
the mysql extension:

$ cp -rp php-4.0.X/ext/mysql/* .

It is time to finish the module. Run:

$ phpize

You can now ship the contents of the directory – the extension
can live completely on its own.

The user instructions boil down to

$ ./configure \
[--with-php-config=/path/to/php-config] \
[--with-mysql=MYSQL-DIR]
$ make install

The MySQL module will either use the embedded MySQL client
library or the MySQL installation in MYSQL-DIR.

Read More