';PDOException';带有消息';找不到驱动程序';使用AppServer


'PDOException' with message 'could not find driver' using AppServer

我已经安装了AppServer 2.5.10(包括Apache和MySQL),我得到了这个错误:

致命错误:无法捕获消息为"的异常"PDOException"在C:''AppServ''www''compras.mysql''bd.php中查找驱动程序:17堆栈跟踪:#0C: ''AppServ''www''compras.mysql''bd.php(17):PDO->__construct('mysql:host=loca…','root','root')#1C: ''AppServ''www''compras.mysql''datas.php(9):Bd->__construct()#2C: ''AppServ''www''compras.mysql''index.php(6):类别()#3{main}在第17行的C:''AppServ''www''compras.mysql''bd.php中抛出

我已经在Windows中的php.ini文档中取消了"extension=php_pdo_mysql.dll"行的注释,但它仍然不起作用。

   function __construct() {
    $this->usuario = 'root';
    $this->clave = 'root';
    $this->dsn = 'mysql:host=localhost;dbname=compras';
    $this->conn = new PDO(
            $this->dsn, 
            $this->usuario, 
            $this->clave);
}

这是我代码的一部分。错误中所述的行是用于创建新PDO的行。知道为什么它不起作用吗?

habilite a extendsão PDO_MYSQL/启用扩展PDO_MYSQ

cd php5.3.29/ext/pdo_mysql
   phpize
   ./configure
   make && make install
#php.ini
extension=pdo_mysql.so