Zend 打开 Zend/Application.php 失败 [英] Zend Failed opening Zend/Application.php

查看:26
本文介绍了Zend 打开 Zend/Application.php 失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以我对 Zend 比较陌生.我创建了一个新的应用程序,并开始基于指南构建一个身份验证系统.但是,服务器正在踢出内部服务器错误.

在检查 PHP 错误日志时,我得到了以下两个错误:

<块引用>

[Thu Jul 19 10:26:40 2012] [error] [client 80.194.255.4] PHP 警告:require_once(Zend/Application.php):无法打开流:/home/www 中没有这样的文件或目录-data/zend.danielgroves.net/htdocs/public/index.php 第 18 行

[2012 年 7 月 19 日星期四 10:26:40] [错误] [客户端 80.194.255.4] PHP 致命错误:require_once():打开所需的Zend/Application.php"失败(include_path='/home/www-data/zend.danielgroves.net/htdocs/library:.:/usr/share/php:/usr/share/pear') 在/home/www-data/zend.danielgroves.net/htdocs/public/index.php第 18 行

控制器:-

class Admin_AuthController 扩展 Zend_Controller_Action{公共函数 init(){/* 在这里初始化动作控制器 */}公共函数 indexAction(){$form = new Application_Form_login();$request = $this->getRequest();如果 ($request->isPost()) {如果 ($form->isValid($request->getPost())) {}}$this->view->form = $form;}}

关于这可能是什么原因的任何想法?正如我所说,我是 Zend 的新手,所以当涉及到这些错误时,我真的不知道从哪里开始,尤其是因为这是引用由 Zend CLI 工具创建的文件.

任何指示/建议等都会非常受欢迎.

丹.

解决方案

您的应用程序需要能够访问 Zend Framework 类.通常,您会将这些放入应用程序中的 library 文件夹中(Zend Tool 不会为您执行此操作).因此,从您下载的 ZF 副本中,将 library/Zend 文件夹复制到您的 library 文件夹中.您应该在 /home/www-data/zend.danielgroves.net/htdocs/library/Zend/Application.php 找到它正在寻找的文件,这将修复错误.>

Ok, so I am relatively new to Zend. I have created a new application and started to build an authentication system based on a guide. However, the server is kicking out an Internal Server Error.

Upon checking the PHP error logs I have been given the following two errors:

[Thu Jul 19 10:26:40 2012] [error] [client 80.194.255.4] PHP Warning: require_once(Zend/Application.php): failed to open stream: No such file or directory in /home/www-data/zend.danielgroves.net/htdocs/public/index.php on line 18

[Thu Jul 19 10:26:40 2012] [error] [client 80.194.255.4] PHP Fatal error: require_once(): Failed opening required 'Zend/Application.php' (include_path='/home/www-data/zend.danielgroves.net/htdocs/library:.:/usr/share/php:/usr/share/pear') in /home/www-data/zend.danielgroves.net/htdocs/public/index.php on line 18

The controller:-

class Admin_AuthController extends Zend_Controller_Action 
{ 
    public function init() 
    { 
         /* Initialize action controller here */ 
    } 

    public function indexAction() 
    { 
        $form = new Application_Form_login(); 
        $request = $this->getRequest(); 
        if ($request->isPost()) { 
            if ($form->isValid($request->getPost())) {
           
            } 
        }
        $this->view->form = $form;
    }
}

Any ideas on what the cause of this could be? As I said I am new to Zend so I don't really know where to start when it comes to these errors, especially as this is referencing files that were created by the Zend CLI tool.

Any pointers/suggestions etc would be muchly appriciated.

Dan.

解决方案

Your application needs to be able to access the Zend Framework classes. Typically you would put these into the library folder in your app (Zend Tool does not do this for you). So from your downloaded copy of ZF, copy the library/Zend folder into your library folder. You should end up with the file it is looking for at /home/www-data/zend.danielgroves.net/htdocs/library/Zend/Application.php, which will fix the error.

这篇关于Zend 打开 Zend/Application.php 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆