我对 zend 框架有疑问。我有一个使用 php & zend 框架 & MySQL 开发的网站的源文件。本网站是以前由其他人开发的。我想在我的计算机上本地运行这些文件,以便我可以对网站进行更改。我安装了 xampp 和 php,但是当我尝试运行它时,浏览器上出现错误:
Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)' in C:\xampp\htdocs\www\medicatoz\library\Zend\Db\Adapter\Pdo\Abstract.php:143
Stack trace:
#0 C:\xampp\htdocs\www\medicatoz\library\Zend\Db\Adapter\Abstract.php(441): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 C:\xampp\htdocs\www\medicatoz\library\Zend\Db\Adapter\Pdo\Abstract.php(230): Zend_Db_Adapter_Abstract->query('SET NAMES UTF8', Array)
#2 C:\xampp\htdocs\www\medicatoz\conf\bootstrap.php(63): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES UTF8') #3 C:\xampp\htdocs\www\medicatoz\index.php(4): require('C:\xampp\htdocs...') #4 {main} thrown in C:\xampp\htdocs\www\medicatoz\library\Zend\Db\Adapter\Pdo\Abstract.php on line 143
你们能帮我弄清楚这个错误是什么吗?我怀疑它可能是数据库,但我不知道具体的。我希望也许以前遇到过这个错误的人能给我一个想法。提前致谢。
大家好,我已经尝试了你的建议,看来我已经通过了 db 部分。但现在它显示此错误:
Array ( [0] => Zend_Controller_Dispatcher_Exception Object ( [message:protected] => 指定的控制器无效 (www) [string:Exception:private] => [code:protected] => 0 [file:protected] => C:\ xampp\htdocs\www\library\Zend\Controller\Dispatcher\Standard.php [line:protected] => 241 [trace:Exception:private] => Array ([0] => Array ([file] => C: \xampp\htdocs\www\library\Zend\Controller\Front.php [line] => 936 [function] => dispatch [class] => Zend_Controller_Dispatcher_Standard [type] => -> [args] => Array ([0 ] => Zend_Controller_Request_Http 对象 ( [_paramSources:protected] => 数组 ( [0] => _GET [1] => _POST ) [_requestUri:protected] => /www/web/themes/medicatoz/index.phtml [_baseUrl:受保护] => [_basePath:protected] => [_pathInfo:protected] =>/www/web/themes/medicatoz/index.phtml [_params:protected] => 数组 ([controller] => www [action] => web [themes] => medicatoz [module] => default) [_aliases:protected ] => Array ( ) [_dispatched:protected] => 1 [_module:protected] => 默认 [_moduleKey:protected] => 模块 [_controller:protected] => www [_controllerKey:protected] => 控制器 [_action:protected ] => web [_actionKey:protected] => action ) [1] => Zend_Controller_Response_Http 对象 ( [_body:protected] => Array ( ) [_exceptions:protected] => Arrayprotected] => www [_controllerKey:protected] => 控制器 [_action:protected] => web [_actionKey:protected] => action ) [1] => Zend_Controller_Response_Http Object ( [_body:protected] => Array ( ) [_exceptions :protected] => 数组protected] => www [_controllerKey:protected] => 控制器 [_action:protected] => web [_actionKey:protected] => action ) [1] => Zend_Controller_Response_Http Object ( [_body:protected] => Array ( ) [_exceptions :protected] => 数组递归[_headers:protected] => 数组 () [_headersRaw:protected] => 数组 () [_httpResponseCode:protected] => 200 [_isRedirect:protected] => [_renderExceptions:protected] => [headersSentThrowsException] => 1) ) ) [1] => Array ( [file] => C:\xampp\htdocs\www\index.php [line] => 5 [function] => dispatch [class] => Zend_Controller_Front [type] => - > [args] => 数组 () ) [上一个:异常:私有] => ) )
我认为这表明访问存在一些限制,阻止它显示正确的网站。知道如何克服这个问题吗?感谢您的耐心和帮助。