Statement on glibc/iconv Vulnerability

Установка

Чтобы собрать модуль ibm_db2, необходимо установить в систему файлы заголовков и библиотеки для разработки приложений СУБД DB2. Система DB2 не устанавливает их по умолчанию, поэтому, возможно, придётся вернуться к установщику DB2 и добавить эти настройки. Клиент разработки приложений (Application Development Client) DB2 включает файлы заголовков и доступен для бесплатного скачивания с » сайта поддержки реляционной системы управления базами данных IBM DB2 Universal Database (DB2 UDB).

Если файлы заголовков и библиотеки для разработки DB2-приложений добавлены в операционную систему Linux или Unix, в которой база DB2 уже была установлена, нужно запустить команду db2iupdt -e, чтобы обновить символические ссылки на них в этом экземпляре DB2.

Модуль ibm_db2 — это модуль » PECL, так что следуйте инструкции «Установка модулей PECL» для его установки в PHP. Чтобы указать расположение файлов заголовков и библиотек DB2, команду configure запускают как показано ниже:

bash$ ./configure --with-IBM_DB2=/path/to/DB2
По умолчанию, configure использует путь /opt/IBM/db2/V8.1.

Замечание: Замечание для пользователей IIS

Если драйвер ibm_db2 работает на сервере Microsoft Internet Information Server (IIS), возможно, потребуется сделать следующее:

  • Установите DB2 с расширенной безопасностью операционной системы.
  • Добавьте путь к исполняемому файлу PHP в системную переменную окружения PATH (по умолчанию C:\php\).
  • Создайте ещё одну системную переменную окружения, содержащую путь к PHP.INI (например: PHPRC = C:\php\).
  • Добавьте учётную запись пользователя IUSR_COMPUTERNAME в группу DB2USERS.

add a note

User Contributed Notes 5 notes

up
33
jean dot ferreira at gmail dot com
10 years ago
==Installation ibm_db2 in PHP5, using Data Server Driver Package and pecl on Debian / Ubuntu==

==Advantages==
#You do not need DB2 (database) installed
#The ibm_db2 driver is downloaded and automatically compiled by pecl

==Steps==
#1- Install packages
apt-get install php-pear ksh zip

#2- Make directory
mkdir /opt/ibm

#3- Download Data Server Driver Package (dsdriver), as the architecture
(https://www-304.ibm.com/support/docview.wss?rs=4020&uid=swg27016878&wv=1)

#4- Decompress dsdriver at /opt/ibm/
tar -xvf v10.5fp1_linuxx64_dsdriver.tar.gz (linux64)
or
tar -xvf v10.5fp1_linuxia32_dsdriver.tar.gz (linux32)

#5- Change permission instalation script - /opt/ibm/dsddriver
chmod 755 installDSDriver

#6- Run the installation script
ksh installDSDriver

#7- Download and install the driver using the pecl
pecl install ibm_db2

downloading ibm_db2-1.9.5.tgz ...
Starting to download ibm_db2-1.9.5.tgz (157,720 bytes)
................done: 157,720 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626

#8- Configure the installation directory
DB2 Installation Directory? : /opt/ibm/dsdriver

Build process completed successfully
Installing '/usr/lib/php5/20090626/ibm_db2.so'
install ok: channel://pecl.php.net/ibm_db2-1.9.5
configuration option "php_ini" is not set to php.ini location
You should add "extension=ibm_db2.so" to php.ini

#9- Change php.ini
vim /etc/php5/apache2/php.ini
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
extension = ibm_db2.so
extension = /usr/lib/php5/20090626/ibm_db2.so

#10- Reboot the Apache
service apache2 restart
up
2
kpfitzgerald at gmail dot com
13 years ago
Actually a much simpler way on SLES 11 SP1 and DB2 Express C is to execute the following.

pecl install ibm_db2

when it asks for your path put in your location of SQLLIB not your db2 install. usually found here...

/home/db2inst1/sqllib

to verify execute
pecl list

Should show the following:

Installed packages, channel pecl.php.net:
=========================================
Package Version State
ibm_db2 1.9.1 stable
up
2
rifat dot aras at gmail dot com
11 years ago
If you try to use the php_ibm_db2.dll that comes with the database while working with a WAMP server, you may have difficulties loading the ibm_db2 extension. You can understand this by checking the Apache error log.

This can be solved by downloading the correct dll by visiting http://sourceforge.net/projects/db2mc/files/ and then clicking "IBM_DB2 PHP Driver for Windows > PHP 5.(2|3)._ > VC(6|9) > php_ibm_db2-ver-(nts_ts)-vc(6|9)-x86.zip"

The correct dll version can be determined by checking the "Compiler" and "Thread Safety" fields on the php_info page.

Copy the dll to the extension directory, update the php.ini file, and restart the Apache service.
up
2
AngocA
15 years ago
I installed this tool foolwing the next steps:

(Prereq: I've installed DB2 express-c before, and also Apache and php)

- Download the file: ibm_db2-1.8.2.tgz
- Untar the file: tar -xvf ibm_db2-1.8.2.tgz
- Go to the main directory
- Execute 'phpize' and that creates several files.
- Execute './configure --with-IBM_DB2=/opt/ibmn/db2/V9.5_01'
- Execute 'make'
- Execute 'make install'
- Modify the php.ini file in order to activate the ibm_db2.so extension.
extension=ibm_db2.so

To check that the library is included: php -i

Then, you have to restart Apache: httpd -k restart
up
-2
angoca at yahoo dot com
12 years ago
In DB2 v9 the clients have changed their names. Now, they are called

Data server client

If you search in Internet "DB2 fixpack" you will get an IBM address like

http://www-01.ibm.com/support/docview.wss?uid=swg24031181

You select the DB2 version and fixpack level, then the platform and finally the product, that in this case is "Data Server client"
To Top