PHP5 Zip Support on OpenBSD 4.5

This is a cheat sheet on getting PHP5 on OpenBSD to have zip support. I needed this to get CiviCRM to work with Joomla.

First off install some require packages, including the zziplib package:


  export PKG_PATH=http://mirror.aarnet.edu.au/pub/OpenBSD/4.5/packages/i386/
  pkg_add -v zziplib
  pkg_add -v autoconf-2.62

Now download and extract the PECL zip package:

  mkdir /usr/local/src/
  cd /usr/local/src/
  wget http://pecl.php.net/get/zip
  tar zxvf zip
  cd zip-1.10.2/ 

Compile PECL zip, making sure you set your correct autoconf to use:

  export AUTOCONF_VERSION=2.62
  phpize
  ./configure
  make
  make install

Finally setup php5 and restart httpd:

  cat << EOF >> /var/www/conf/php.ini
  extension=zip.so
  EOF
  sudo apachectl stop
  sudo apachectl start

Of course, this will go stale over time as new releases and versions come out, so YMMV.

One Comment

Leave a Reply

Your email is never shared.Required fields are marked *