II LIBAPACHE2-MOD-PHP5 5.3.10-1ubuntu3.8 server-side, html-embedded scripting language (A Pache 2 module) II libsqlite3-0 3.7.17-1+debphp.org~precise+2 SQLite 3 shared Libraryii Php-pe Ar 5.3.10-1ubuntu3.8 pear-php Extension and application Repositoryii 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 (C GI binary) II php5-cli 5.3.10-1ubuntu3.8 command-line interpreter for the PHP5 Scripting Languageii Php5-common 5.3.10-1ubuntu3.8 Common Files for packages Buil T from the php5 sourceii php5-curl 5.3.10-1ubuntu3.8 Curl module for PHP5II ph P5-dev 5.3.10-1ubuntu3.8 Files for PHP5 module developmentii PHP5-GD 5.3.10- 1ubuntu3.8 GD module for php5ii php5-mysql 5.3.10-1ubuntu3.8 M Ysql module for PHP5II php5-odbc 5.3.10-1ubuntu3.8 ODBC module for PHP5II PHP5 -sqlite 5.3.10-1ubuntu3.8 sqlite module for php5ii php5-sybase 5.3.10-1ubuntu3.8 sybase/ms SQL Server module for PHP5
These packages are installed. According to my previous experience, I should get a drive in Phpinfo ().
PDO drivers dblib, mysql, odbc, sqlite
But only got the
PDO drivers mysql
May I ask what the problem is? Will it be related to Apache configuration?
Reply content:
II LIBAPACHE2-MOD-PHP5 5.3.10-1ubuntu3.8 server-side, html-embedded scripting language (A Pache 2 module) II libsqlite3-0 3.7.17-1+debphp.org~precise+2 SQLite 3 shared Libraryii Php-pe Ar 5.3.10-1ubuntu3.8 pear-php Extension and application Repositoryii 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 (C GI binary) II php5-cli 5.3.10-1ubuntu3.8 command-line interpreter for the PHP5 Scripting Languageii Php5-common 5.3.10-1ubuntu3.8 Common Files for packages Buil T from the php5 sourceii php5-curl 5.3.10-1ubuntu3.8 Curl module for PHP5II ph P5-dev 5.3.10-1ubuntu3.8 Files for PHP5 module developmentii PHP5-GD 5.3.10- 1ubuntu3.8 GD module for php5ii php5-mysql 5.3.10-1ubuntu3.8 M Ysql module for PHP5II php5-odbc 5.3.10-1ubuntu3.8 ODBC module for PHP5II PHP5 -sqlite 5.3.10-1ubuntu3.8 sqlite module for php5ii php5-sybase 5.3.10-1ubuntu3.8 sybase/ms SQL Server module for PHP5
These packages are installed. According to my previous experience, I should get a drive in Phpinfo ().
PDO drivers dblib, mysql, odbc, sqlite
But only got the
PDO drivers mysql
May I ask what the problem is? Will it be related to Apache configuration?
The reason is: you packed the wrong bag.
The Php5-mysql package corresponds to a mysql_* series function, such as mysql_query (), which has nothing to do with PDO.
If you want to use PDO to operate MySQL, install these two packages: Php5-pdo Php5-pdo_mysql, do not need php5-mysql.
Similarly, Pgsql, Sybase, SQLite and other database PDO support corresponding package name is: Php5-pdo_pgsql, Php5-pdo_sybase, Php5-pdo_sqlite
php.ini
Is there an open extension in there?