Tech project: AIX + phpV5 + OpenSSL = Does Not Work

By | 2010/08/23

I’ve been working on a 2-year integration project with a large Fortune-500 company. We scoped out the project up front and were approaching the final testing phase. As often happens when a project is about to be completed —  the project scope changed.

This project involves a legacy AIX application and the scope change required the addition of a SOAP-wrapper. Here is a description of the project in a nutshell: the system takes shipping data, puts it into an XML request, sends the XML off to a blackbox application owned by another company. The blackbox rate shops and sends back the ship method, tracking number, and all necessary paperwork/labels. The legacy app parses the XML, decodes/prints, and moves on to the next shipment. The scope change simply required us to send the XML using SOAP, rather than as raw XML, which is the default for the legacy app.

I gave the SOAP-wrapper task to Sierra-Bravo (one of my favorite vendors!). The plan was to install the SOAP-wrapper on the legacy AIX server. To run it, we’d simply pass XML to the SOAP-wrapper and let the SOAP-wrapper communicate with the blackbox.  It should be easy. Here are the unfortunate details:

php-5.3.2 compilation settings:

–with-openssl=/usr/local/ssl   –enable-soap

Results of php compile:

ld: 0711-317 ERROR: Undefined symbol: .EVP_MD_size
ld: 0711-317 ERROR: Undefined symbol: .EVP_CIPHER_iv_length
ld: 0711-317 ERROR: Undefined symbol: .EVP_CIPHER_block_size
ld: 0711-317 ERROR: Undefined symbol: .EVP_CIPHER_CTX_block_size
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

collect2: ld returned 8 exit status
make: *** [sapi/cgi/php-cgi] Error 1

This is a known, open bug with php and OpenSSL. See http://bugs.php.net/bug.php?id=45711

Lesson learned: If you’re trying to compile php 5.3.2 (or earlier) on AIX 5.3 (also some other Unix flavors) with OpenSSL 1.0, come up with a new plan.

Our plan B was this: move the SOAP-wrapper to a Linux web server and write a perl script to run the php program on the Linux web server:

system("/usr/local/bin/wget -q -O - --post-file=$output 'http://webserver/path/program.php?log=1&test=1'");

Problem solved. And lesson confirmed: with tech projects, there is almost always another option (or 3/4/5+ alternatives). If one path gets blocked, you just look for a different path. This is just one of the many reasons I like IT so much.

One thought on “Tech project: AIX + phpV5 + OpenSSL = Does Not Work

  1. ing insurance co

    Maybe the BEST blog I have read ever?

    Mauro

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.