Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

DB2 best practices: Deploying IBM DB2 Express-C with PHP on Ubuntu Linux

Craig Tobias (ctobias@ca.ibm.com), DB2 Quality Assurance, IBM
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 (fanwar@ca.ibm.com), DB2 Information Development, IBM
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.

Summary:  This best practice article provides a step-by-step approach to installing and configuring IBM DB2 Express-C software, PHP Hypertext Preprocessor, and Apache HTTP Server on a system running the Ubuntu Linux operating system. After completing the installation and configuration steps in this paper, you will have a fully functioning PHP web application server with DB2 Express-C as the back-end data server.

View more content in this series

Date:  20 Dec 2011
Level:  Introductory

Activity:  11560 views
Comments:  

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.

In this article

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.


Download

DescriptionNameSizeDownload method
Article in PDF formatDB2BP_PHP_1211.pdf394KBHTTP

Information about download methods          Get Adobe® Reader®


Resources

Learn

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

Biographies

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.

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management
ArticleID=781969
SummaryTitle=DB2 best practices: Deploying IBM DB2 Express-C with PHP on Ubuntu Linux
publish-date=12202011