|
1 | 1 | # IBM_DB2
|
2 | 2 |
|
3 |
| -Interface for PHP to DB2 for z/OS, DB2 for LUW, DB2 for i. |
| 3 | +Interface for PHP to DB2 for z/OS, DB2 for LUW. [Db2 for IBM i support is deprecated](#new-implementations). |
4 | 4 |
|
5 | 5 | ## Pre-requisites
|
6 | 6 |
|
7 | 7 | The minimum PHP version supported by driver is PHP 7.3 and the latest version supported is PHP 8.2.
|
8 | 8 |
|
9 |
| -## IBM i users |
| 9 | +## LUW/z/Db2 Connect users |
10 | 10 |
|
11 |
| -When running on IBM i, `IBM_DB2` doesn't link with the Db2 LUW client library, |
12 |
| -but instead with libdb400, which provides a PASE wrapper for SQL/CLI. The |
13 |
| -differences between SQL/CLI in IBM i and the LUW driver are wrapped for you. |
14 |
| -You don't need Db2 Connect on IBM i as a result. |
| 11 | +[CLI driver](https://www.ibm.com/support/pages/db2-odbc-cli-driver-download-and-installation-information) MUST be installed |
| 12 | +in your system. You can find and download the latest versions from [here](https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/). |
15 | 13 |
|
16 |
| -To install, make sure you have the new Yum-based OSS environment. Install PHP, |
17 |
| -plus any dependencies like so: |
| 14 | +`php`, `gcc`, `make` and `tar` should be installed in your system. |
| 15 | + |
| 16 | +You may not find `gcc`, `make`, `tar` in some of the docker images (like Amazon Linux2). |
| 17 | +In such cases use below command to install `gcc`, etc. |
18 | 18 |
|
19 | 19 | ```shell
|
20 |
| -yum install sqlcli-devel gcc make-gnu |
| 20 | +yum install make gcc |
21 | 21 | ```
|
22 | 22 |
|
23 |
| -Tony Cairns' [replacement libdb400](https://bitbucket.org/litmis/db2sock/src/master/db2/) |
24 |
| -is not yet tested, but may be desirable due to its greater debugging features. |
| 23 | +## Db2 for IBM i |
25 | 24 |
|
26 |
| -## LUW/z/Db2 Connect users |
| 25 | +### New implementations |
27 | 26 |
|
28 |
| -CLIDRIVER should be installed in your system. |
29 |
| -If not installed Download from the below link. |
| 27 | +**NOTICE**: IBM [recommends](https://www.ibm.com/support/pages/node/883624) that if you are working on a new [Db2 for IBM i](https://www.ibm.com/support/pages/db2-ibm-i) |
| 28 | +connection, you MUST use the [PDO_ODBC](https://www.php.net/manual/en/ref.pdo-odbc.php) or the [ODBC](https://www.php.net/manual/en/book.uodbc.php) |
| 29 | +extensions instead with the [ODBC Driver for IBM i Access Client Solutions](https://www.ibm.com/support/pages/odbc-driver-ibm-i-access-client-solutions). |
30 | 30 |
|
31 |
| -<a name="downloadCli"></a> [DOWNLOAD CLI DRIVER](https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/) |
| 31 | +### Existing implementations |
32 | 32 |
|
33 |
| -PHP, gcc, make, tar should be installed in your system. |
| 33 | +If you are using this extension with an existing connection running on IBM i, `IBM_DB2` doesn't link with the Db2 LUW client |
| 34 | +library, but instead with libdb400, which provides a PASE wrapper for SQL/CLI. The differences between SQL/CLI in IBM i and |
| 35 | +the LUW driver are wrapped for you. You don't need Db2 Connect on IBM i as a result. |
34 | 36 |
|
35 |
| -You may not find gcc, make, tar in some of the docker containers (Example Amazon Linux2). |
36 |
| -In such cases use below command to install gcc etc. |
| 37 | +To install, make sure you have the new Yum-based OSS environment. Install PHP, |
| 38 | +plus any dependencies like so: |
37 | 39 |
|
38 | 40 | ```shell
|
39 |
| -yum install make gcc |
| 41 | +yum install sqlcli-devel gcc make-gnu |
40 | 42 | ```
|
| 43 | + |
| 44 | +Tony Cairns' [replacement libdb400](https://bitbucket.org/litmis/db2sock/src/master/db2/) |
| 45 | +is not yet tested, but may be desirable due to its greater debugging features. |
| 46 | + |
41 | 47 | ## How to install php ibm_db2 extension in Linux/Mac.
|
42 | 48 |
|
43 | 49 | If `IBM_DB_HOME` and `LD_LIBRARY_PATH` environment variable not set then set them with installed CLIDRIVER.
|
|
0 commit comments