Reply to Re: [PHP] cybercash as a shared object

Your name:

Reply:


Posted by Bill Shupp on 05/28/05 19:14

Bill Shupp wrote:
> I need to install the cybercash module on a Debian Sarge system. I
> really want to keep Debian's PHP packages, and just build this as a
> shared module. At least one post in the archives indicates that this is
> possible, as does one changelog entry. However, no specifics were offered.
>
> Here's what I've tried:
>
> I can build the module fine statically.
>
> I can build the shared module cybercash.so by modifying the
> ext/cybercash/config.m4 and Makefile files, modeling them after the
> mcrypt.so entries. While modules/cybercash.so does get built, I get
> this error when trying to load it:
>
> PHP Warning: Unknown(): Invalid library (maybe not a PHP library)
> 'cybercash.so' in Unknown on line 0
>
> I'm building with PHP 4.3.10, and the latest cybercash from PECL. I've
> also tried the cybercash module from 4.2.3, as suggested in one of the
> online manual comments.
>
> Any guidance would be greatly appreciated!
>
> Regards,
>
> Bill Shupp

I was able to get it compiled by re-writing the config.m4 file, modeling
it after the pfpro config.m4 file. Here's what I posted on the online
manual comments, just so that it makes it to the mail archives as well:



##################################

Here's how to install cybercash dynamically into PHP
----------------------------------------------------

1. Make sure you have the php dev tools installed, like pear and phpize.

2. Download the cybercash module:

pear download cybercash

3. Untar the module:

tar -xzf cybercash-<version>.tgz

4. Download and install my updated config.m4 file, the current one (as
of version 1.18p1) doesn't work:

wget http://shupp.org/patches/cybercash.config.m4
cd cybercash-<version>
mv ../cybercash.config.m4 config.m4

5. Setup/compile module

phpize
../configure --with-cybercash=/path/to/cybercash-mck-library-source/c-api
make

6. Install module. For Debian Sarge, the modules directory is
/usr/lib/php4/20020429/:

cp modules/cybercash.so /usr/lib/php4/20020429/
(make install may work also)

7. Enable the module in php.ini, restart apache.


##################################


Incidentally, when I tried to compile the pfpro module from within the
PHP source using buildconf, I got setting mismatch errors when trying to
load it into Debian's PHP binaries. However, by moving the extension
out of the PHP source, and using phpize to setup it up, it loaded perfectly.

Hope this helps someone else save some time!


Regards,

Bill Shupp

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация