mirror of
https://github.com/php/pecl-database-ibm_db2.git
synced 2026-03-23 23:02:16 +01:00
df913feb4dff56366ac4656b0bb6b39200794bde
Procedure to install the ibm_db2 extension in Linux or Unix:
1. Using the export command, set the environment variable IBM_DB_HOME:
$export IBM_DB_HOME=DB2HOME
The DB2HOME is the directory where the IBM Data Server product is installed. For example:
$ export IBM_DB_HOME=/home/db2inst1/sqllib
2. Using one of the following three methods, install the ibm_db and pdo_ibm extensions
- Use the pecl install command included in the PHP Extension Community Library (PECL).
pecl install ibm_db2
- Use the commands included in the source code:
a) Extract the source archive
b) Run the following commands from the extracted directory:
$ phpize --clean
$ phpize
$ ./configure
$ make
$ make install
3. Open the php.ini file in an editor of your choice. Edit the extension entry in the
php.ini file in the <local_php_directory>/php/lib directory to reference the PHP driver:
extension=ibm_db2.so
4. Ensure that the PHP driver can access the libdb2.so CLI driver file by
setting the LD_LIBRARY_PATH variable for Linux and UNIX operating systems
other than the AIX® operating system. For AIX operating system, you must set LIBPATH variable.
5. Optional: If the PHP application that is connecting to an IBM database server is running ini
the HTTP server environment, add the LD_LIBRARY_PATH variable in the httpd.conf file.
Contributing:
See CONTRIBUTING.md
The developer sign-off should include the reference to the DCO in defect remarks(example below):
DCO 1.1 Signed-off-by: Random J Developer <random@developer.org>
Description
⚠️ ARCHIVED: Original GitHub repository no longer exists. Preserved as backup on 2026-01-22T16:21:54.513Z
Languages
PHP
68.4%
C
31.3%
M4
0.3%