cat brain.log | less

Getting it down on `paper`

Compiling for PHP

Does the following sentence make sense?

In order to be able to simply dl(“”) in your PHP code, you first need to make sure is compiled and copied to the extension_dir, as specified in php.ini (ex: /usr/lib/php4).

No: Stop right now. You’re not qualified to read this article.
Yes: Keep reading.


You’re not compiling the PHP source code for actual use, so please don’t install it. If you do, you run the risk of clobbering any pre-existing php installations, and overwriting previously compiled-in modules. The only reason why you ”make” PHP is so that the Zend libraries are properly initialized.

The PHP ”make” step may be avoidable, but given that the compile doesn’t affect system performance, I didn’t bother.

Paths should be changed to reflect your setup. If you don’t have the src/contrib/data/php/datascope code, you can get it from the contrib source at BRTT‘s web site.

Contrib appears to be maintained by Indiana University.


  • Antelope Bash Script ”/opt/antelope/4.9/”
  • Datascope Source ”/opt/antelope/4.9/src/contrib/data/php/datascope”
  • PHP Source Code URL ””
  • PHP Modules Directory ”/usr/lib/php/modules/”

Compile and Install Steps

  1. wget <PHP Source Code>
  2. bunzip2 php-5.1.4.tar.bz2
  3. tar xf php-5.1.4.tar
  4. cd php-5.1.4
  5. PHP_INC=`pwd`
  6. export PHP_INC
  7. ./configure
  8. make
  9. cd <Datascope Source>
  10. source <Antelope Bash Script>
  11. sudo make install
  12. sudo cp <PHP Modules Directory>

PHP Script Example

Proper usage of the ”” module follows:

putenv( "PFPATH=/opt/antelope/4.9/data/pf" );
putenv( "ANTELOPE=/opt/antelope/4.9" );
if( !extension_loaded( "" ) ) {
  dl( "") || exit( "Failed to load" ) ;


No comments so far.

You must be logged in to post a comment.