Seiden Group
Modern Development & Open Source for IBM i
  • Link to LinkedIn
  • Link to Mail
  • Home
  • Seiden PHP+
    • Seiden PHP+
    • Install & Learn
    • SmartSupport
    • PHP Migrations & Upgrades
    • Success Stories
    • Free PHP Assessment
    • Documentation
    • What’s New (Changelog)
  • IBM i Services
    • Development
    • Training & Mentoring
    • Open Source Setup & Upgrades
    • SSL/TLS Install & Learn
    • Performance
  • Support
    • Open Source & PHP
    • VS Code for i
    • Developer Support
    • Support Success Stories
  • VS Code for i
    • Support
    • Training
    • Code for i Resource Guide
    • Getting Started Videos
    • Code for IBM i Fridays
  • Free Stuff
    • IBM i Strategy & Tips
    • PHP Upgrade Assessment
    • CNX Valence Assessment
    • VS Code for IBM i Resources
    • Code for IBM i Fridays
    • QCachegrind Download
    • PHP Toolkit for IBM i Resources
    • Qshell on i Library
  • Blog
  • About
    • About Our Team
    • About Alan Seiden
    • Speakers & Sessions
    • In the News
  • Contact
  • 201.447.2437
  • Search
  • Menu Menu

Seiden Group Blog

ibm_db2 & ODBC Run Side-by-Side in Seiden PHP+

December 28, 2021/0 Comments/in ODBC, PHP, Seiden PHP+ /by Calvin Buckley

PHP on IBM iIn the past, PHP on IBM i implementations could not load both the classic database extensions (ibm_db2 / PDO_IBM) and the ODBC extensions (odbc / PDO_ODBC) at the same time. An error such as “ibm_db2 GetDiagRec failed” would result.

In July 2021, we overcame those limitations in Seiden PHP+. Now the classic PHP database extensions can run side-by-side with ODBC.

To our knowledge, Seiden PHP+ is the only IBM i PHP that can load all the Db2 extensions at the same time. Therefore, when you install Seiden PHP+, all the Db2 extensions (ibm_db2, PDO_IBM, odbc, and PDO_ODBC) can be enabled by default.

Why is this important?

When IBM i teams want to migrate from the classic extensions to PDO_ODBC, they can now adopt ODBC without affecting existing applications. They can migrate at their own pace by using both connectivity types in the same application. For example, a single PHP script can use ibm_db2 for one query and PDO_ODBC for another.

How do I use this feature if I have an older PHP+ package?

First, update to our current software, especially the latest php-ibm_db2, php-pdo_ibm, and siteadd packages. You can update them through ACS or through the command line like so:

1
$ yum update php-ibm_db2 php-pdo_ibm siteadd

After updating, you can enable all the Db2 extensions using the toggle-db command with the -t both flag. To do so for a specific site, point it to the site’s PHP extension INI directory:

1
$ toggle-db -t both -d /www/SITE_NAME_HERE/phpconf/conf.d

To enable these extensions globally for PHP-CLI and all sites using a global (not custom) configuration:

1
$ toggle-db -t both

If you have any questions, don’t hesitate to ask us.

Share this entry
  • Share on Facebook
  • Share on X
  • Share on Pinterest
  • Share on LinkedIn
  • Share on Tumblr
  • Share on Reddit
  • Share by Mail
https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png 0 0 Calvin Buckley https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png Calvin Buckley2021-12-28 11:12:442025-08-29 10:09:05ibm_db2 & ODBC Run Side-by-Side in Seiden PHP+
Calvin Buckley

About Calvin Buckley

Recognized as an IBM Champion and a 2020 Fresh Face of IBM i, Calvin exhibits remarkable talent for expanding the use of IBM i through open ...Read More

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

SUBSCRIBE
Open Thinking
Monthly IBM i Strategy & Tips
  • This field is for validation purposes and should be left unchanged.

IBM i Development

  • RPG, COBOL, SQL, Node,
    PHP, Python, Valance, etc.
  • Modernization. Integration.
  • Web and API Solutions
  • Legacy Maintenance
    ...
LET'S GET IT DONE!

Recent Posts

  • Do You Need IBM i Observability?
  • PHP 8.6 is Coming Soon to IBM i
  • Safer npm installation is on the way for Node.js (and all JavaScript)
  • Access Modern Security for IBM i and Connected Web Environments
  • IBM i: A Natural Platform for Agentic AI
  • PHP on IBM i in 2026: The Modernization Engine
  • Your “AS/400” Is a Modern IBM i Platform
  • MCP + AI for IBM i Teams (with a MongoDB example)
  • GnuPG PHP Extension for IBM i: Now Included with Seiden Support
  • Getting Started with Code for IBM i: A Lunch & Learn Video

SEIDEN GROUP: Modern Development & Open Source for IBM i

Home   |   Seiden PHP+   |   IBM i Services  |   Support   |   VS Code for i   |   Free Stuff   |   Blog  |   Privacy Policy  |   Contact         201.447.2437

© 2026 Seiden Group, LLC
  • Link to LinkedIn
  • Link to Mail
Link to: Visual Studio Code and 5250 Link to: Visual Studio Code and 5250 Visual Studio Code and 5250 Link to: Porting a Cross-Platform C++ Application to Mac Link to: Porting a Cross-Platform C++ Application to Mac Porting a Cross-Platform C++ Application to Mac
Scroll to top Scroll to top Scroll to top