Combining the power of IBM® DB2® Express-C with the Apache HTTP server and the PHP programming language on a system running the Ubuntu Linux® operating system, provides a powerful, flexible, and reliable application development platform. This platform is ideal for small businesses, developers, instructors, and students, because the software components are free to download and use.
The goal of this document is to provide a step-by-step approach to installing and configuring IBM DB2 Express-C software (DB2 Express-C), PHP Hypertext Preprocessor, and Apache HTTP Server on the Ubuntu Linux operating system (Ubuntu).
In this document, you use the popular Advanced Packaging Tool (APT) package management system to download, install, and configure the necessary software components. APT is the recommended system for managing software installations on Ubuntu, greatly simplifying all aspects of software package management.
The document explains how to install the Apache 2 HTTP Server with built-in PHP 5 support. The installation of the ibm_db2 extension for PHP is covered. You use the PEAR pecl utility to download and recompile the PHP module to enable support for the ibm_db2 PECL extension.
Downloading and installing DB2 Express-C 9.7 Fix Pack 4 is covered at length. The instructions include the setup of a default DB2 instance and creation of a sample database for testing. Sample PHP scripts are provided to test the connections to the web server and to retrieve data from the sample database.
| Description | Name | Size | Download method |
|---|---|---|---|
| Article in PDF format | DB2BP_PHP_1211.pdf | 394KB | HTTP |
Information about download methods Get Adobe® Reader®
Learn
- Learn more about DB2 best practices.
- Learn more about DB2 Express-C.
- Visit the DB2 V9.7 Information Center.
- Learn more about Ubuntu.
- Learn more about Ubuntu 10.04.
- Learn more about PHP Hypertext Preprocessor.
- Learn more about Apache HTTP Server.
- Learn more about ibm_db2 PECL extension.
- In the Information Management
area on developerWorks, get the resources you need to advance your
skills on IBM Information Management products.
- Stay current with developerWorks technical events and webcasts focused on a variety
of IBM products and IT industry topics.
- Follow developerWorks on
Twitter.
- Watch developerWorks on-demand demos advanced functionality for
experienced developers.
Get products and technologies
-
Evaluate IBM
products in the way that suits you best: Download a product trial,
try a product online, use a product in a cloud environment, or spend a few
hours in the SOA Sandbox.
Discuss
- Participate in the discussion forum.
- Get involved in the My developerWorks
community. Connect with other developerWorks users while exploring
the developer-driven blogs, forums, groups, and wikis.
Craig Tobias is a quality assurance specialist with the DB2 for Linux, Unix, and Windows product team at the IBM Canada Lab in Ottawa, Ontario. Craig joined IBM in 2001 as a Java developer on the DB2 Administration tools team where he was the lead developer for the DB2 Control Center storage management tools. In 2006, Craig moved to the DB2 System Test team where he now spends his days ensuring DB2 is of the highest possible quality. Craig holds a Computer Science degree from the University of Western Ontario, where he was also introduced to the wonders of web application development with PHP on Linux.
Farzana Anwar is a member of the DB2 for Linux, UNIX, and Windows team at the IBM Canada Lab in Markham, Ontario. Since 2004 she has held various roles across IBM, in the areas of application development, system verification test, technical support and information development. She has a Bachelor of Computer Science from Acadia University and a Master of Computer Science in Information Systems from Athabasca University. In her current role as a technical writer for DB2 for Linux, UNIX, and Windows, Farzana focuses on making DB2 products more consumable for our users. She also coordinates the publication of DB2 technical white papers on developerWorks.
