配置 Zend 服务器时出错
我正在尝试根据《Pro Zend Framework Techniques - Build a Full CMS Project》一书中的说明配置 Zend Server CE。
这本书让我执行以下操作:
将httpd.conf从:更改
DocumentRoot "C:\Program Files\Zend\Apache2/htdocs"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
为:
DocumentRoot "C:/Program Files/Zend/Apache2/htdocs/rlms/public"
<Directory "C:\Program Files\Zend\Apache2\htdocs\rlms">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
我还在application.ini中将其更改
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
为:
resources.frontController.controllerDirectory = APPLICATION_PATH "/layouts/scripts"
我的反斜杠和/或正斜杠有问题吗?转到 http://localhost 和 http://localhost/rlms/public,我收到以下堆栈跟踪:
致命错误:未捕获异常“Zend_Controller_Dispatcher_Exception”,消息“指定的控制器无效(错误)”在 C:\Program Files\Zend 中\ZendServer\share\ZendFramework\library\Zend\Controller\Dispatcher\Standard.php:242 堆栈跟踪:#0 C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Controller\Front.php(946 ): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Application\Bootstrap\Bootstrap.php(77): Zend_Controller_Front ->dispatch() #2 C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Application.php(358): Zend_Application_Bootstrap_Bootstrap->run() #3 C:\Program Files\Zend\ Apache2\htdocs\rlms\public\index.php(26): Zend_Application->run() #4 {main} 抛出在 C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Controller\Dispatcher \Standard.php 第 242 行
...有什么想法吗?谢谢!
I am trying to configure Zend Server CE based on the instructions in the book "Pro Zend Framework Techniques - Build a Full CMS Project".
The book has me do the following:
Alter httpd.conf from:
DocumentRoot "C:\Program Files\Zend\Apache2/htdocs"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
to:
DocumentRoot "C:/Program Files/Zend/Apache2/htdocs/rlms/public"
<Directory "C:\Program Files\Zend\Apache2\htdocs\rlms">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
I also changed in application.ini:
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
to:
resources.frontController.controllerDirectory = APPLICATION_PATH "/layouts/scripts"
Is there something wrong with my backslashes and/or forward slashes? Upon going to http://localhost and http://localhost/rlms/public, I receive the following stack trace:
Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Controller\Dispatcher\Standard.php:242 Stack trace: #0 C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Controller\Front.php(946): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Application\Bootstrap\Bootstrap.php(77): Zend_Controller_Front->dispatch() #2 C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Application.php(358): Zend_Application_Bootstrap_Bootstrap->run() #3 C:\Program Files\Zend\Apache2\htdocs\rlms\public\index.php(26): Zend_Application->run() #4 {main} thrown in C:\Program Files\Zend\ZendServer\share\ZendFramework\library\Zend\Controller\Dispatcher\Standard.php on line 242
...any ideas? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没关系,事实证明我需要
在修改控制器路径之前添加:到 application.ini
Nevermind, it turns out that I needed to add:
to application.ini, before I was modifying the controllers path