RE: PHP and Informix?
Posted in 2011
Outlook just rocks my world. Here's the script again with the correct linebreaks, I hope: ## installdir is something like /opt/ibmclidriver mkdir -p %{buildroot}%{installdir} cd %{buildroot}%{installdir} ## extract the GA version, which includes the header files tar -zx --strip-components=2 -f %{_sourcedir}/ibm_data_server_driver_for_odbc_cli_32_linuxia32_v97.tar.gz ## overwrite with the fixpack. Kind of an upgrade tar -zx --strip-components=2 -f %{_sourcedir}/v9.7fp3a_linuxia32_odbc_cli.tar.gz ## install the libdb2osse.so.1 library on the system mkdir -p %{buildroot}%{_libdir} cp %{_sourcedir}/libdb2osse.so.1 %{buildroot}%{_libdir} cd %{buildroot}%{_libdir} ln -s libdb2osse.so.1 libdb2osse.so Regards, Aleksander Kamenik System Administrator Krediidiinfo AS an Experian Company Phone: +372 665 9649 Email: aleksander@krediidiinfo.ee > -----Original Message----- > From: informix-list-bounces@iiug.org [mailto:informix-list- > bounces@iiug.org] On Behalf Of Kamenik, Aleksander > Sent: Wednesday, March 30, 2011 2:12 PM > To: informix-list@iiug.org > Subject: RE: PHP and Informix? > > > From: Art Kagel [mailto:art.kagel@gmail.com] > > > > Check out this link: > > > > > http://publib.boulder.ibm.com/infocenter/idshelp/v115/index.jsp?topic=/ > com.ibm.conn.doc/php.htm > > > > The "db2 driver" is any of several packages. The link above notes > > that the easiest to use is "IBM Data Server Driver for ODBC and CLI" > > found > > at: > > > > > https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?lang=en_US&so > urce=swg-informixfpd > > > > installation instructions are at: > > > > > http://publib.boulder.ibm.com/infocenter/idshelp/v115/index.jsp?topic=/ > com.ibm.conn.doc/installcli.htm > > Thanks, this got me started. > > The link you provided got me is the 9.5 version though. On a separate > route through the corporate homepage hell I got the latest 9.7 version. > It might be found here, if you're lucky: > > http://www-01.ibm.com/software/data/db2/linux-unix- > windows/download.html -> Data Server Client Packages (GA level) -> IBM > Data Server Driver for ODBC and CLI (CLI Driver) -> Choose your > platform and download. > > Then, you download the latest fixpack. The reason for the GA download > is that the fixpack does not contain the header files which you'll need > to build pdo_ibm. > > http://www-01.ibm.com/software/data/db2/linux-unix- > windows/download.html -> Data Server Client Packages (latest fixpacks) > -> Choose the latest version which matches with tha GA release and > download the fixpack. > > But even this is not enough. These fixpacks (at least for 32bit linux) > use security32/plugin/IBM/client/IBMOSauthclient.so.1, which is linked > against libdb2osse.so.1 which is NOT included. If you're trying to make > an RPM package then rpm will complain that you don't have > libdb2osse.so.1 installed. I don't know what it does or if it's > actually required but why link against it then? > > It is shipped with the DB2 Client > (v9.7fp3a_linuxia32_client_conpe_t.tar.gz), which can be found on the > same fixpack page. Choose Client instead of Cli and ODBC driver. You > only need the latest fixpack. I couldn't figure out how to extract the > .so without installing the package. But fortunately I had junk VM's > lying around. From an installation there I copied the libdb2osse.so.1 > file. > > So to install this package, which is required by pdo_ibm, I have this > script (from the install section of my rpm spec file): > > ## installdir is something like /opt/ibmclidriver mkdir -p > %{buildroot}%{installdir} cd %{buildroot}%{installdir} ## extract the > GA version, which includes the header files tar -zx --strip- > components=2 -f > %{_sourcedir}/ibm_data_server_driver_for_odbc_cli_32_linuxia32_v97.tar. > gz > ## overwrite with the fixpack. Kind of an upgrade tar -zx --strip- > components=2 -f %{_sourcedir}/v9.7fp3a_linuxia32_odbc_cli.tar.gz > ## install the libdb2osse.so.1 library on the system mkdir -p > %{buildroot}%{_libdir} cp %{_sourcedir}/libdb2osse.so.1 > %{buildroot}%{_libdir} cd %{buildroot}%{_libdir} ln -s libdb2osse.so.1 > libdb2osse.so > > Now the pdo_ibm install is simple, provided you have the pdo header > files installed, probably the php-devel package. > > This is for SLES11SP1, but can be changed for any other distro: > > %build > phpize > %configure --with-pdo-ibm=/opt/ibmclidriver make > > %install > mkdir -p %{buildroot}%{extension_dir} > mkdir -p %{buildroot}%{php_module_conf_dir} > cp modules/%{module_name}.so %{buildroot}%{extension_dir} echo > "extension=%{module_name}.so" > > %{buildroot}%{php_module_conf_dir}/%{module_name}.ini > > Hope this helps someone, > > Aleksander Kamenik > System Administrator > Krediidiinfo AS > an Experian Company > Phone: +372 665 9649 > Email: aleksander@krediidiinfo.ee > > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list