The PDO extension is required for this adapter but the extension is not loaded

前端 未结 4 927
伪装坚强ぢ
伪装坚强ぢ 2021-01-13 09:46

I am getting the following exception when i try to use the fetchall method of the Zend_Db_Table_Abstract class...

An error occurred4545
EXCEPTION_OTHER
Excep         


        
4条回答
  •  灰色年华
    2021-01-13 10:25

    First of all, you cannot have both :

    extension=pdo.so
    extension=pdo_mysql.so
    

    Which are for Linux, and :

    extension=php_pdo.dll 
    extension=php_pdo_mssql.dll 
    

    Which are for windows : you've got to choose, depending on the system you are using.

    As you are on windows, you should use the .dll version.


    But note that you used :

    extension=php_pdo_mssql.dll 
    

    i.e. you loaded the pdo_mssql extension -- which is for Microsoft SQL Server, and not MySQL.

    Instead, you should load the extension for MySQL :

    extension=php_pdo_mysql.dll 
    

    After correcting that, restart Apache ; and things should get better.


    If things don't get better, you should check the output of phpinfo() :

    • At the beginning of phpinfo()'s output, it indicates which php.ini file is loaded ; make sure you modified the right one.
    • Check, lower in the file, if there is a section about pdo_mysql
      • If not, check Apache's error_log, just in case ;-)

提交回复
热议问题