Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 server . And the same pachages on my PC. But after I test it.I got 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 I lose dblib on my server? Have I miss some important packages?

like image 909
kamushin Avatar asked Mar 22 '23 16:03

kamushin


1 Answers

This is for Ubuntu 12.04 LTS:

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

php5-sybase will give you dblib, tdsodbc will give you FreeTDS and php5-odbc will give you ODBC. These will likely require other packages so just accept whatever apt suggests when you run the above command.

like image 79
Benny Hill Avatar answered Mar 24 '23 05:03

Benny Hill