PDO installed but no dblib

root@YYDream:/etc/apache2# dpkg -l |grep php5
ii  libapache2-mod-php5               5.3.10-1ubuntu3.8                   server-side, HTML-embedded scripting language (Apache 2 module)
ii  php5                              5.3.10-1ubuntu3.8                   server-side, HTML-embedded scripting language (metapackage)
ii  php5-cgi                          5.3.10-1ubuntu3.8                   server-side, HTML-embedded scripting language (CGI binary)
ii  php5-cli                          5.3.10-1ubuntu3.8                   command-line interpreter for the php5 scripting language
ii  php5-common                       5.3.10-1ubuntu3.8                   Common files for packages built from the php5 source
ii  php5-curl                         5.3.10-1ubuntu3.8                   CURL module for php5
ii  php5-dev                          5.3.10-1ubuntu3.8                   Files for PHP5 module development
ii  php5-gd                           5.3.10-1ubuntu3.8                   GD module for php5
ii  php5-mysql                        5.3.10-1ubuntu3.8                   MySQL module for php5
ii  php5-odbc                         5.3.10-1ubuntu3.8                   ODBC module for php5
ii  php5-sqlite                       5.3.10-1ubuntu3.8                   SQLite module for php5
ii  php5-sybase                       5.3.10-1ubuntu3.8                   Sybase / MS SQL Server module for php5

I install these packages on the server. And the same patches on my PC. But after I checked it. I got the information below.

PDO drivers dblib, mysql, odbc, sqlite # this info in phpinfo() on my pc

PDO drivers mysql #this info in phpinfo() on my server

Well, I think I installed the same package for these two machines. But why am I losing dblib on my server? Skip some important packages?

+4
source share
2 answers

This is for Ubuntu 12.04 LTS:

sudo apt-get install php5-odbc php5-sybase tdsodbc

php5-sybaseHe will give you dblib, tdsodbcgive you FreeTDSand php5-odbcgive you ODBC. This will probably require other packages, so just accept any suggestions aptwhen executing the above command.

+5
source

Check if the package is installed freetds-binand / or freetds-bin:i386.

+1
source

All Articles