你式做什么的?需要db2数据库?
你看看pear中就有关于db2数据库连接的class

解决方案 »

  1.   

    好象在编译的时候在PHP后面加一句:--with-db2[=DIR].
      

  2.   

    先安装好DBII,安装好apache,然后安装php
    下载php的tar.gz包,解压
    然后用./configure命令配置php
    ./configure --with-apxs=/usr/sbin/apxs \ 
    --prefix=/usr/local/php \ 
    --with-gd \ 
    --enable-versioning \ 
    --with-oracle=/usr/oracle \ 
    --with-oci8=/usr/oracle \ 
    --with-db2=/usr/db2 \
    --with-zlib \ 
    --with-dbase \ 
    --with-filepro \ 
    --with-config-file-path=/etc/httpd/conf \ 
    --with-fdftk=no \ 
    --enable-debug=no \ 
    --enable-magic-quotes \ 
    --enable-debugger \ 
    --enable-bcmath \ 
    --enable-track-vars \ 
    --enable-safe-mode \ 
    --with-system-regex \ 
    --with-xml \
    --no-create \ 
    --no-recursion \执行完这个后,再执行
    make
    还有
    make install
    最后把php.ini-dist拷贝到apache的配置文件目录命名为php.ini
    cp php.ini-dist /usr/local/lib/php.ini安装的关键是指定正确的apache的lib目录和apxs目录