For work we have a PHP extension written in C++. The extension implements our cryptography code so the PHP version of our merchant scripts can use it. We've only had a couple of PHP users to date and things had been working OK. Now we have more and one of them gets a segfault when they run the code - and they're on FreeBSD 4.5, which is fairly old. On their box, and another (FreeBSD 4.9) instead of building paycash.so you end up with cppext.so - which I believe is an error in the config.m4 file. (Renaming the .so manually works.) The thing is I really don't know much about PHP extension coding - I didn't write this one either. The original crypto code came from our Russian team, and my boss modified it and wrapped it to create the extension. But I'm the one who has to work with it so I'd really like to resolve these issues. The thing is, on my Red Hat boxes and my FreeBSD 4.7 box here it works fine - it builds the correctly named file and no segfaults. I haven't worked with C++ in nearly 10 years until this came up, so I'm rather rusty. And I'm still trying to figure out the PHP extension issues - so if anyone has a few spare cycles and is willing to peruse the code and hit me with a clue bad, It'd be appreciated.
http://techsrvc.cyphermint.com/downloads/ - there are 2 PHP related tarballs. One is the crypto source, the other is the merchant scripts that then use the .so the source builds. (There is also the Perl Kit there if you're curious - but that's been working fine. I can put up the ASP or ColdFusion versions if you really want to see them. ;-) I don't maintain those.)