How to compile Oracle support (Oci8) for PHP on Solaris

Ok, we all know that this should be a trivial task. And it really is. Just a few steps to complete:

  • Go to Oracle’s download page
  • Search for the real download link
  • Choose your favorite platform there
  • Click on desired file
  • Click ok on popup reminder that you have to agree to the Download Licence Agreement
  • Click “Accept Download Licence Agreement”
  • Click on desired file (again)
  • Press ok on Popup window telling you to register
  • Go to register page, fill in registration data
  • Click “Continue”
  • Read error message
  • Go back to registration and sign up for one of the mandatory newsletters
  • Go back to download site (You *did* bookmark it, did you?)
  • Click on desired file (again)
  • Click on desired file (again)
  • Find out that the download has already started in the background
  • Delete superfluous copies of the file you downloaded
  • unZIP (as we all know, ZIP *is* the packer of choice on *nix alike platforms)
  • Download OCI8 support from pecl.php.net
  • Unpack
  • Start configure
  • Learn that the Oracle Instant Client doesn’t contain the header files
  • Go back to Oracle Download Page (you’d *really* better bookmark that page, dude)
  • Click on … download … unzip
  • Try to configure Oci8 again (will fail anyway)
  • Go to unpacked Oracle SDK dir
  • Create ./lib directory
  • Move files from Base Client directory to newly created lib dir
  • Go back to Oci8
  • Try to configure (will work this time)
  • Make (will fail)
  • Patch Makefile for Oci8 (hint: Add library pathes for Oracle Client)
  • Configure (will fail, even if you patched correctly)
  • Go back to Oracle Client SDK lib dir
  • Create symlink for libclntsh.so
  • Go back to Oci8 dir
  • Make (will work, really)
  • Make install
Guys, that’s really like software installation should work in 2008. Not.

One thought on “How to compile Oracle support (Oci8) for PHP on Solaris

  1. Pilot

    Maybe this procedure is one reason, why it is recommended to book lots of trainings before doing any real work with oracle?

    So this post could be the whole content of day 1 of the “PHP Programming with Oracle Databases” crash course.

Comments are closed.