安装zend Framework后,codeigniter无法正常工作

时间:2015-04-28 14:20:48

标签: php codeigniter zend-framework ubuntu-14.04

我使用的是Ubuntu 14.04。 我使用codeigniter完成了一个项目,并且工作正常。 但现在我想到学习zend框架并使用本教程Digital Ocean在我的机器上安装了zend framework 1.12.3。

当我试图访问我创建的新项目时     http://localhost/ZendApp 我收到此错误

        An error occurred
        Page not found
        Exception information:

        Message: Invalid controller specified (ZendApp)
        Stack trace:

        #0 /home/ZendFramework-1.12.3/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
        #1 /home/ZendFramework-1.12.3/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
        #2 /home/ZendFramework-1.12.3/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
        #3 /var/www/html/ZendApp/public/index.php(26): Zend_Application->run()
        #4 {main}  

        Request Parameters:

        array (
          'controller' => 'ZendApp',
          'action' => 'index',
          'module' => 'default',
        )  

当我尝试访问我的旧项目时,我已经使用了codeigniter,我也得到了同样的错误。

        An error occurred
        Page not found
        Exception information:

        Message: Invalid controller specified (lankahomes)
        Stack trace:

        #0 /home/ZendFramework-1.12.3/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
        #1 /home/ZendFramework-1.12.3/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
        #2 /home/ZendFramework-1.12.3/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
        #3 /var/www/html/ZendApp/public/index.php(26): Zend_Application->run()
        #4 {main}  

        Request Parameters:

        array (
          'controller' => 'lankahomes',
          'action' => 'index',
          'module' => 'default',
        )  

有人可以帮助我解决这个问题。 TNX

1 个答案:

答案 0 :(得分:3)

关于你的apache配置(我假设你使用apache导致它在数字海洋文档中)

<my:ExtendedTable>
  <my:columns>
    <table:Column width="100px">
      <table:label><Label text="{something}" /></table:label>
      <table:template><TextView text="{somethingElse}" /></table:template>
    </table:Column>
  </my:columns>
</my:ExtendedTable>

使用此配置,您的localhost域仅适用于您的zend项目。将其ServerName更改为另一个域,并将其添加到/ etc / hosts文件,如

的/ etc / apache2的/网站启用/ 000-默认

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot /var/www/ZendApp/public

的/ etc /主机

<VirtualHost *:80>
      ServerName zendproject.dev
      DocumentRoot /var/www/ZendApp/public

然后重启你的apache服务器。然后,您可以将zendproject.dev域用于zend app,将localhost用于默认的localhost目录。 (我假设你有另一个用于localhost的apache vhosts conf文件)

相关问题