配置 Zend 服务器时出错

发布于 2024-08-17 10:34:03 字数 2036 浏览 4 评论 0原文

我正在尝试根据《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://localhosthttp://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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

‘画卷フ 2024-08-24 10:34:03

没关系,事实证明我需要

resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"

在修改控制器路径之前添加:到 application.ini

Nevermind, it turns out that I needed to add:

resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"

to application.ini, before I was modifying the controllers path

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文