Skip to main content

How to add pdo_odbc (unixODBC flavor) to raw opts? Static vs Shared build issue

Comments

1 comment

  • cPanelKeithS
    I wanted to share the resolution I found in my test environment so that others may find this helpful. -bash-4.1# yum -y install unixODBC unixODBC-devel Add the configure flags to the rawopts file for php5. Declaring 'shared' first was necessary. -bash-4.1# cat /var/cpanel/easy/apache/rawopts/all_php5 --with-pdo-odbc=shared,unixODBC,/usr # /scripts/easyapache --build If PDO is not already enabled, you will need to run easyapache without --build and select PDO through the menu. -bash-4.1# php -i | grep -i odbc Configure Command => './configure' '--disable-fileinfo' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-libxml' '--enable-pdo=shared' '--enable-sockets' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libxml-dir=/opt/xml2/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-sqlite=shared' '--with-pic' '--with-zlib' '--with-zlib-dir=/usr' PDO drivers => sqlite, mysql, odbc PDO_ODBC PDO Driver for ODBC (unixODBC) => enabled ODBC Connection Pooling => Enabled, strict matching I did have to add the extension directive to the php.ini manually, as well -bash-4.1# grep pdo_odbc /usr/local/lib/php.ini extension=pdo_odbc.so
    0

Please sign in to leave a comment.