PHP 中的PDOException「無法找到驅動程式」
嘗試使用Symfony2 指令建立模式時:
php app/console doctrine:schema:create
PDOException “could not find driver”
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/mysql.so' - /usr/lib/php5/20090626+lfs/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/mysqli.so' - /usr/lib/php5/20090626+lfs/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/pdo_mysql.so' - /usr/lib/php5/20090626+lfs/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
解決方案:
sudo apt-get install php5-gd php5-mysql
以上是如何修復 Symfony2 中的「PDOException:找不到驅動程式」?的詳細內容。更多資訊請關注PHP中文網其他相關文章!