• <bdo id='sWXJ3'></bdo><ul id='sWXJ3'></ul>
      <tfoot id='sWXJ3'></tfoot>

      1. <i id='sWXJ3'><tr id='sWXJ3'><dt id='sWXJ3'><q id='sWXJ3'><span id='sWXJ3'><b id='sWXJ3'><form id='sWXJ3'><ins id='sWXJ3'></ins><ul id='sWXJ3'></ul><sub id='sWXJ3'></sub></form><legend id='sWXJ3'></legend><bdo id='sWXJ3'><pre id='sWXJ3'><center id='sWXJ3'></center></pre></bdo></b><th id='sWXJ3'></th></span></q></dt></tr></i><div id='sWXJ3'><tfoot id='sWXJ3'></tfoot><dl id='sWXJ3'><fieldset id='sWXJ3'></fieldset></dl></div>
        <legend id='sWXJ3'><style id='sWXJ3'><dir id='sWXJ3'><q id='sWXJ3'></q></dir></style></legend>

      2. <small id='sWXJ3'></small><noframes id='sWXJ3'>

        此适配器需要 PDO 扩展,但未加载扩展

        The PDO extension is required for this adapter but the extension is not loaded(此适配器需要 PDO 扩展,但未加载扩展)

            <small id='r0Oh1'></small><noframes id='r0Oh1'>

              <bdo id='r0Oh1'></bdo><ul id='r0Oh1'></ul>
            • <tfoot id='r0Oh1'></tfoot>
                    <tbody id='r0Oh1'></tbody>
                  <i id='r0Oh1'><tr id='r0Oh1'><dt id='r0Oh1'><q id='r0Oh1'><span id='r0Oh1'><b id='r0Oh1'><form id='r0Oh1'><ins id='r0Oh1'></ins><ul id='r0Oh1'></ul><sub id='r0Oh1'></sub></form><legend id='r0Oh1'></legend><bdo id='r0Oh1'><pre id='r0Oh1'><center id='r0Oh1'></center></pre></bdo></b><th id='r0Oh1'></th></span></q></dt></tr></i><div id='r0Oh1'><tfoot id='r0Oh1'></tfoot><dl id='r0Oh1'><fieldset id='r0Oh1'></fieldset></dl></div>
                  <legend id='r0Oh1'><style id='r0Oh1'><dir id='r0Oh1'><q id='r0Oh1'></q></dir></style></legend>
                • 本文介绍了此适配器需要 PDO 扩展,但未加载扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  当我尝试使用 Zend_Db_Table_Abstract 类的 fetchall 方法时,出现以下异常...

                  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
                  Exception information:
                  Message: The PDO extension is required for this adapter but the extension is not loaded 
                  
                  Stack trace:
                  #0 D:wwwTestProjectlibraryendDbAdapterPdoMysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
                  #1 D:wwwTestProjectlibraryendDbAdapterAbstract.php(448): Zend_Db_Adapter_Pdo_Mysql->_connect()
                  #2 D:wwwTestProjectlibraryendDbAdapterPdoAbstract.php(238): Zend_Db_Adapter_Abstract->query('DESCRIBE `album...', Array)
                  #3 D:wwwTestProjectlibraryendDbAdapterPdoMysql.php(156): Zend_Db_Adapter_Pdo_Abstract->query('DESCRIBE `album...')
                  #4 D:wwwTestProjectlibraryendDbTableAbstract.php(823): Zend_Db_Adapter_Pdo_Mysql->describeTable('albums', NULL)
                  #5 D:wwwTestProjectlibraryendDbTableAbstract.php(862): Zend_Db_Table_Abstract->_setupMetadata()
                  #6 D:wwwTestProjectlibraryendDbTableAbstract.php(969): Zend_Db_Table_Abstract->_setupPrimaryKey()
                  #7 D:wwwTestProjectlibraryendDbTableSelect.php(100): Zend_Db_Table_Abstract->info()
                  #8 D:wwwTestProjectlibraryendDbTableSelect.php(78): Zend_Db_Table_Select->setTable(Object(Application_Model_Albums))
                  #9 D:wwwTestProjectlibraryendDbTableAbstract.php(1005): Zend_Db_Table_Select->__construct(Object(Application_Model_Albums))
                  #10 D:wwwTestProjectlibraryendDbTableAbstract.php(1303): Zend_Db_Table_Abstract->select()
                  #11 D:wwwTestProjectapplicationcontrollersIndexController.php(17): Zend_Db_Table_Abstract->fetchAll()
                  #12 D:wwwTestProjectlibraryendControllerAction.php(513): IndexController->indexAction()
                  #13 D:wwwTestProjectlibraryendControllerDispatcherStandard.php(289): Zend_Controller_Action->dispatch('indexAction')
                  #14 D:wwwTestProjectlibraryendControllerFront.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
                  #15 D:wwwTestProjectlibraryendApplicationBootstrapBootstrap.php(97): Zend_Controller_Front->dispatch()
                  #16 D:wwwTestProjectlibraryendApplication.php(366): Zend_Application_Bootstrap_Bootstrap->run()
                  #17 D:wwwTestProjectpublicindex.php(26): Zend_Application->run()
                  #18 {main}  
                  Request Parameters:
                  array (
                    'controller' => 'index',
                    'action' => 'index',
                    'module' => 'default',
                  )  
                  

                  我在php.ini文件中添加了以下几行

                  I have added the following lines in the php.ini file

                  extension=pdo.so
                  extension=pdo_mysql.so
                  
                  extension=php_pdo.dll 
                  extension=php_pdo_mssql.dll 
                  

                  我的系统中还安装了PDO MySQL 包.但我仍然收到上述异常......(还重新启动了Apache服务器)

                  Also i have The PDO MySQL package installed in my system. But still I am getting the above exception.... (Also restarted the Apache server)

                  推荐答案

                  首先,你不能同时拥有:

                  First of all, you cannot have both :

                  extension=pdo.so
                  extension=pdo_mysql.so
                  

                  适用于 Linux,以及:

                  Which are for Linux, and :

                  extension=php_pdo.dll 
                  extension=php_pdo_mssql.dll 
                  

                  哪些适用于 Windows:您必须选择,具体取决于您使用的系统.

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

                  在 Windows 上,您应该使用 .dll 版本.

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


                  但请注意,您使用了 :


                  But note that you used :

                  extension=php_pdo_mssql.dll 
                  

                  您加载了 pdo_mssql 扩展——它用于 Microsoft SQL Server,而不是 MySQL.

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

                  相反,您应该加载 MySQL 的扩展:

                  Instead, you should load the extension for MySQL :

                  extension=php_pdo_mysql.dll 
                  

                  更正后,重启Apache;情况应该会好转.

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


                  如果情况没有好转,您应该检查 phpinfo() 的输出:

                  • phpinfo()输出的开头,表示加载的是哪个php.ini文件;确保你修改了正确的.
                  • 检查,文件中是否有关于pdo_mysql的部分
                    • 如果没有,请检查 Apache 的 error_log,以防万一;-)
                    • 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 ;-)

                      这篇关于此适配器需要 PDO 扩展,但未加载扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                      本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                    <tbody id='hGQhT'></tbody>
                    <bdo id='hGQhT'></bdo><ul id='hGQhT'></ul>

                      <small id='hGQhT'></small><noframes id='hGQhT'>

                      <tfoot id='hGQhT'></tfoot>

                        <legend id='hGQhT'><style id='hGQhT'><dir id='hGQhT'><q id='hGQhT'></q></dir></style></legend>
                      1. <i id='hGQhT'><tr id='hGQhT'><dt id='hGQhT'><q id='hGQhT'><span id='hGQhT'><b id='hGQhT'><form id='hGQhT'><ins id='hGQhT'></ins><ul id='hGQhT'></ul><sub id='hGQhT'></sub></form><legend id='hGQhT'></legend><bdo id='hGQhT'><pre id='hGQhT'><center id='hGQhT'></center></pre></bdo></b><th id='hGQhT'></th></span></q></dt></tr></i><div id='hGQhT'><tfoot id='hGQhT'></tfoot><dl id='hGQhT'><fieldset id='hGQhT'></fieldset></dl></div>