PDOdrivers lacks functionality

Source: Internet
Author: User
Tags sybase
{Code...} has installed these packages. According to my previous experience, I should get the driver {code...} In phpinfo (), but I only got {code...}. What is the possible problem? Will it be related to apache configuration?
ii  libapache2-mod-php5               5.3.10-1ubuntu3.8                   server-side, HTML-embedded scripting language (Apache 2 module)ii  libsqlite3-0                      3.7.17-1+debphp.org~precise+2       SQLite 3 shared libraryii  php-pear                          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 (CGI 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 built from the php5 sourceii  php5-curl                         5.3.10-1ubuntu3.8                   CURL module for php5ii  php5-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                   MySQL 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, we should get the driver in phpinfo ().

PDO drivers dblib, mysql, odbc, sqlite

But only

PDO drivers mysql

What is the possible problem? Will it be related to apache configuration?

Reply content:
ii  libapache2-mod-php5               5.3.10-1ubuntu3.8                   server-side, HTML-embedded scripting language (Apache 2 module)ii  libsqlite3-0                      3.7.17-1+debphp.org~precise+2       SQLite 3 shared libraryii  php-pear                          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 (CGI 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 built from the php5 sourceii  php5-curl                         5.3.10-1ubuntu3.8                   CURL module for php5ii  php5-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                   MySQL 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, we should get the driver in phpinfo ().

PDO drivers dblib, mysql, odbc, sqlite

But only

PDO drivers mysql

What is the possible problem? Will it be related to apache configuration?

The reason is:You have installed the wrong package

The php5-mysql package corresponds to mysql _ * series functions, such as mysql_query (), this package has nothing to do with pdo.

If you want to operate mysql with pdo, install these two packages: php5-pdo php5-pdo_mysql, no php5-mysql.

Similarly, pgsql, sybase, sqlite and other databases pdo support the corresponding package name is: php5-pdo_pgsql, php5-pdo_sybase, php5-pdo_sqlite

php.iniIs there any open extension?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.