Recompile PHP with iodbc

These steps are required to run OSF Web Service on x_64 bit Ubuntu (and probably most Linux distro's). There is an error in the unixodbc drivers that causes the load_ontologies.php step in the constructscs/structwsf installation procedure to fail with core dumps in Apache. The procedure below re-compiles and packages the current PHP5 release to work with iodbc, an alternative ODBC driver.

This bash script was used to build the PHP5 packages for the Ubuntu 14.04 LTS installation procedure. It was constructed using the PHP script for building PHP5 from source code. It was run in the following environment:

1. VMware Fusion Ubuntu 14.04 x64 virtual machine installed from a downloaded .iso file.

2. The following packages were added to the base install: Vim, Emacs, mailutils, Mutt, fetchmail.

3. Note1: this script was run on a VM that had *not* executed any of the OSF Install steps.

4. Note2: #

Create a working directory (e.g., in your home dir):

Enter the directory:

Install dev tools that'll help you build debian packages:

Get the PHP source:

Enter the PHP directory:

Ensure an unmodified PHP will build. This might take some time as it fetches various dependencies:

Remove unixodbc package as we'll be using iodbc instead:

Replace rules and control file in the php5-5.x.y/debian directory by downloading rules.txt and control.txt. These files change the dependencies from unixodbc to iodbc for the build process.

(Note: still need to update with specific changes.)

Install iodbc and iodbc-dev:

OPTIONAL - If PHP is already installed you will need to update the version number of this package to be greater than the one installed.

Run the command: (While in the php5-5.x.y directory)

Note - This could take up to an hour to fully compile the PHP packages depending on your machine's specs. When completed, it should display a range of new debian packages built and ready to be installed.

Install package apache2-mpm-prefork.

Install packages (replacing  with the version number you may have created in step 9):