{"id":15021863,"url":"https://github.com/php/pecl-database-pdo_ibm","last_synced_at":"2025-10-19T22:31:42.734Z","repository":{"id":20175921,"uuid":"23446808","full_name":"php/pecl-database-pdo_ibm","owner":"php","description":"PDO driver for IBM databases","archived":false,"fork":false,"pushed_at":"2024-12-18T15:06:58.000Z","size":359,"stargazers_count":17,"open_issues_count":8,"forks_count":14,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-01-30T18:02:35.740Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://pecl.php.net/package/pdo_ibm","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-08-28T23:57:22.000Z","updated_at":"2024-09-27T14:15:57.000Z","dependencies_parsed_at":"2023-12-19T01:01:26.780Z","dependency_job_id":"8ce424ee-14d6-483b-b3de-eb51e1b5fb4d","html_url":"https://github.com/php/pecl-database-pdo_ibm","commit_stats":{"total_commits":203,"total_committers":12,"mean_commits":"16.916666666666668","dds":"0.33990147783251234","last_synced_commit":"660e8cd00b39aa1c5a50b0da01bb70e5c16aa6ab"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php%2Fpecl-database-pdo_ibm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php%2Fpecl-database-pdo_ibm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php%2Fpecl-database-pdo_ibm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php%2Fpecl-database-pdo_ibm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php","download_url":"https://codeload.github.com/php/pecl-database-pdo_ibm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237224775,"owners_count":19275085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T19:57:09.354Z","updated_at":"2025-10-19T22:31:37.397Z","avatar_url":"https://github.com/php.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PDO_IBM\n\nInterface for PHP to DB2 for z/OS, DB2 for LUW, DB2 for i.\n\n## Pre-requisites\n\nThe minimum PHP version supported by driver is PHP 7.3 and the latest version supported is PHP 8.2.\n\n## IBM i users\n\nWhen running on IBM i, `PDO_IBM` doesn't link with the Db2 LUW client library,\nbut instead with libdb400, which provides a PASE wrapper for SQL/CLI. The\ndifferences between SQL/CLI in IBM i and the LUW driver are wrapped for you.\nYou don't need Db2 Connect on IBM i as a result.\n\nTo install, make sure you have the new Yum-based OSS environment. Install PHP,\nplus any dependencies like so:\n\n```shell\nyum install sqlcli-devel gcc make-gnu\n```\n\nTony Cairns' [replacement libdb400](https://bitbucket.org/litmis/db2sock/src/master/db2/)\nis not yet tested, but may be desirable due to its greater debugging features.\n\nIBM i users should read `tests/README400.txt` in order to set up prequisites\nfor unit tests.\n\n## LUW/z/Db2 Connect users\n\nCLIDRIVER should be installed in your system.\nIf not installed Download from the below link.\n\n\u003ca name=\"downloadCli\"\u003e\u003c/a\u003e [DOWNLOAD CLI DRIVER](https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/)\n\nPHP should be installed in your system.\n\n## How to install php pdo_ibm extension in Linux/Mac\n\nIf `IBM_DB_HOME` and `LD_LIBRARY_PATH` environment variables are not set, then set them with installed CLIDRIVER.\n(say CLIDRIVER installed at `/home/user/clidriver`)\n\n```shell\nexport IBM_DB_HOME=/home/user/clidriver \nexport LD_LIBRARY_PATH=\"${IBM_DB_HOME}/lib\"\n```\n\n1. Install this extension:\n\n   ```shell\n   pecl install pdo_ibm\n   ```\n        \n2. Open the `php.ini` file in an editor of your choice. Edit the extension entry in the\n   `php.ini` file in the `\u003clocal_php_directory\u003e/php/lib` directory to reference the PHP driver:\n\n   ```ini\n   extension=pdo_ibm.so\n   ```\n       \n3. Ensure that the PHP driver can access the `libdb2.so` CLI driver file by\n   setting the `LD_LIBRARY_PATH` variable for Linux and UNIX operating systems\n   other than the AIX® operating system. For AIX operating system, you must set `LIBPATH` variable.\n\n4. Optionally, if the PHP application that is connecting to an IBM database server is running in\n   the HTTP server environment, add the `LD_LIBRARY_PATH` variable in the `httpd.conf` file.\n\n## Prebuilt binaries for Windows\n\n1. Add the `CLIDRIVER\\bin` path to the `PATH` environment variable like so (for a batch file):\n\n   ```shell\n   set PATH=\u003cCLIDRIVER installed path\u003e\\bin;%PATH%\n   ```\n\n2. Download the DLLs for PHP 7.x and 8.x from [the ibmdb repository](https://github.com/ibmdb/php_ibm_db2).\n   Select the build for the PHP that matches the version, architecture, and thread model.\n\n3. Open the `php.ini` file in an editor of your choice. Edit the extension entry in the\n   `php.ini` file in the `\u003clocal_php_directory\u003e\\php\\lib` directory to reference the driver:\n\n   ```ini\n   extension=php_pdo_ibm\n   ```\n\n## How to run sample program\n\nCreate a `connect.php` script with the following content:\n\n```php\n\u003c?php\n\n$dsn = 'ibm:\u003cDSN NAME\u003e';\n$user = '\u003cUSER\u003e';\n$pass = '\u003cPASSWORD\u003e';\n\n$pdo = new \\PDO($dsn, $user, $pass);\n```\n\nTo run the sample:\n\n```\nphp connect.php\n```\n\n## Contributing:\n\nThe developer sign-off should include the reference to the DCO in defect remarks, like in this example:\n\n```\nDCO 1.1 Signed-off-by: Random J Developer \u003crandom@developer.org\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp%2Fpecl-database-pdo_ibm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp%2Fpecl-database-pdo_ibm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp%2Fpecl-database-pdo_ibm/lists"}