简体   繁体   English

Zend Framework在ubuntu中包含路径错误

[英]Zend Framework include path error in ubuntu

I have developed a Zend Framework application, which works well on xammp and windows. 我已经开发了一个Zend Framework应用程序,该程序在xammp和Windows上都能很好地工作。 Now I want to transfer this application to a new ubuntu web server. 现在,我想将此应用程序转移到新的ubuntu Web服务器上。 However I get the following warning: 但是我收到以下警告:

Warning: include_once(Zend/Navigation/Page/MVC.php): failed to open stream: No such file or directory in /var/www/library/Zend/Loader.php on line 146 Warning: include_once(): Failed opening 'Zend/Navigation/Page/MVC.php' for inclusion (include_path='/var/www/application/../library/:/var/www/library:.:/usr/share/php:/usr/share/pear') in /var/www/library/Zend/Loader.php on line 146 Fatal error: Class 'Zend_Navigation_Page_MVC' not found in /var/www/application/ext/views/NavigationCreator.php on line 34 

So the Autoloader seems not to find the Zend library classes. 因此,自动加载器似乎找不到Zend库类。 My library is really at /var/www/library, my application at /var/www/application. 我的库确实位于/ var / www / library,我的应用程序位于/ var / www / application。 I did sudo chmod -R 777 /var/www to rule out any permission issues. 我做了sudo chmod -R 777 / var / www来排除任何权限问题。

I know that there are several related posts at SO, but non has helped me so far. 我知道SO上有几篇相关的文章,但到目前为止,没有一篇对我有帮助。 Do you have any suggestions how to fix my problem? 您对如何解决我的问题有任何建议吗?

Class name should be Zend_Navigation_Page_Mvc not Zend_Navigation_Page_MVC (note the difference in capitalization). 类名应该是Zend_Navigation_Page_Mvc而不是Zend_Navigation_Page_MVC (请注意大小写的差异)。

Whenever you move a project from windows system to a linux based one, these are common errors you might get. 每当将项目从Windows系统移动到基于Linux的项目时,这些都是您可能会遇到的常见错误。 Because file names are case sensitives in linux. 因为文件名在Linux中区分大小写。 So, always check if the file exists and with the correct case. 因此,请始终检查文件是否存在以及大小写正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM