【问题标题】:Default Index Controller Not Being Called With New Zend Studio Project新 Zend Studio 项目未调用默认索引控制器
【发布时间】:2011-11-30 21:59:31
【问题描述】:

我刚刚购买了 Zend Studio 9 的许可证。我对 Zend 框架的经验很少,以前没有 Zend Studio 的经验。我使用http://framework.zend.com/manual/en/ 作为框架教程,并浏览了位于http://www.zend.com/en/products/studio/resources 的资源以获取有关工作室软件的帮助。

我的主要问题是,在使用 zstudio 创建一个新的 Zend 项目后,我没有看到最初的欢迎消息。以下是我正在使用的步骤:

  1. 我已经安装了 Zend Server 并确认 Web 应用程序正在运行(制作了一些测试文件,它们都正确解析)。

  2. 使用 Zend Studio 创建一个新项目。
    一种。文件->新建->本地 PHP 项目 湾。对于位置,我使用的是 C:\Program Files\Zend\Apache2\htdocs。
    C。对于版本,我使用了默认的“Zend Framework 1.11.11 (Built-in)”

  3. 我去http://localhost:81/projectname。我只看到了我的目录结构,而不是调用默认的索引控制器。

添加信息: 操作系统:Windows 7 PHP版本:5.3

错误日志:

>[Wed Nov 30 14:32:30 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
>[Wed Nov 30 14:32:30 2011] [warn] pid file C:/Program Files (x86)/Zend/Apache2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
>[Wed Nov 30 14:32:30 2011] [notice] Digest: generating secret for digest authentication ...
>[Wed Nov 30 14:32:30 2011] [notice] Digest: done
>[Wed Nov 30 14:32:31 2011] [notice] Apache/2.2.16 (Win32) mod_ssl/2.2.16 OpenSSL/0.9.8o configured -- resuming normal operations
>[Wed Nov 30 14:32:31 2011] [notice] Server built: Aug  8 2010 16:45:53
>[Wed Nov 30 14:32:31 2011] [notice] Parent: Created child process 13788
>[Wed Nov 30 14:32:32 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
>[Wed Nov 30 14:32:32 2011] [notice] Digest: generating secret for digest authentication ...
>[Wed Nov 30 14:32:32 2011] [notice] Digest: done
>[Wed Nov 30 14:32:33 2011] [notice] Child 13788: Child process is running
>[Wed Nov 30 14:32:33 2011] [notice] Child 13788: Acquired the start mutex.
>[Wed Nov 30 14:32:33 2011] [notice] Child 13788: Starting 64 worker threads.
>[Wed Nov 30 14:32:33 2011] [notice] Child 13788: Starting thread to listen on port 10081.
>[Wed Nov 30 14:32:33 2011] [notice] Child 13788: Starting thread to listen on port 81.

【问题讨论】:

    标签: zend-framework zend-studio


    【解决方案1】:

    如果您导航到http://localhost:81/projectname/index/index,是否会加载正确的屏幕?

    如果是这样:

    • 检查公共目录中的 .htaccess 文件是否包含正确的 Zend Framework 重写规则。
    • 检查您的 httpd.conf 文件并确保将 index.php 添加到 DirectoryIndex 指令中。

    我认为解决方案将是第二个项目符号,但请告诉我您发现了什么,如果这不起作用,我可以提供进一步的帮助。对 httpd.conf 进行任何更改后,请务必重新启动 apache。

    否则,报告您在直接访问控制器时看到的任何错误,并检查 Apache 的 error_log 文件以查看是否有任何错误。

    【讨论】:

    • 该文件不存在。这是我的目录结构的样子: # .buildpath # .project # .settings/ # .zfproject.xml # application/ # docs/ # library/ # public/ # tests/ 我将 指令添加到我的本地主机,但是这样做之后,apache 不会重新启动。
    • 所以public/.htaccess 不存在?这是你问题的一部分。您不需要向 httpd.conf 添加 指令,只需确保 <DirectoryIndex> 包含 index.php。默认情况下它只包含 index.html
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-21
    • 1970-01-01
    相关资源
    最近更新 更多