如何在远程服务器上运行Zend Framework


how to run zend framework on remote server

我正在研究zend Framework,我已经使用zend Framework创建了一个网站,但现在我想在远程服务器上运行我的项目。但是,当我将所有项目数据传输到远程服务器时,它不起作用。

我的Zend框架在本地主机上项目很好。

我还阅读了Getting Started with Zend Framework By Rob Allen, www.akrabat.com.手册

所以,在阅读了这本手册后,我找到了这篇重要的文章。

You must also ensure that Apache is configured to support .htaccess files. This is usually done by
changing the setting:
! AllowOverride None
to
! AllowOverride All
in your httpd.conf file. Check with your distribution’s documentation for exact details. You will not be able
to navigate to any page other than the home page in this tutorial if you have not configured mod_rewrite
and .htaccess usage correctly.

但实际上我正在使用共享远程服务器,因此我从那里更改apache config并且mod_rewrite.

注意:- 我的项目适用于本地主机,因为我在阅读本文档后进行了一些更改。

任何帮助都非常感谢。

我感觉有一个错误没有显示。您确定显示所有错误吗?

  1. 将以下内容添加到您的index.php

    error_reporting(E_ALL);
    ini_set('display_errors', 'on');
    
  2. 您是否在配置文件中设置了这些(很可能是application.ini[development : production]部分)?

    [development : production]
    phpSettings.display_startup_errors = 1
    phpSettings.display_errors = 1
    resources.frontController.params.displayExceptions = 1
    
  3. 您的应用程序是否在development环境中?您很可能可以在index.php中设置它,如下所示:

    // Define application environment
    defined('APPLICATION_ENV')
        || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));
    

这可能会显示对您隐藏的错误。我希望该错误可以帮助您解决问题。