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 which means that when you get to the load_ontologies.php step in the constructscs/structwsf installation guide it will fail with core dumps in Apache. The procedure below recompiles/packages the current PHP 5 release to work with iodbc. An alternative ODBC driver.

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):