简体   繁体   English

Kohana 3.3 模型类未找到错误仅在 php 5.5.3 中

[英]Kohana 3.3 model Class Not Found error only in php 5.5.3

I am writing a Kohana app that has been dev'd locally on Ubuntu 12.04 LTS (PHP 5.3).我正在编写一个在 Ubuntu 12.04 LTS (PHP 5.3) 上本地开发的 Kohana 应用程序。 It works without issue in this environment, but it throws a fatal error whenever it tries to autoload a classes/Model class on the production server (which is Ubuntu 13.10 running PHP 5.5).它在这种环境中可以正常工作,但是每当它尝试在生产服务器(运行 PHP 5.5 的 Ubuntu 13.10)上自动加载类/模型类时,它都会引发致命错误。 The application code is exactly the same.应用程序代码完全相同。 The only difference I could mention is that the apache vhost conf uses the Require directive instead of the Allow/Deny syntax because Ubuntu 13.10 ships with newer version of apache.我能提到的唯一区别是 apache vhost conf 使用 Require 指令而不是 Allow/Deny 语法,因为 Ubuntu 13.10 附带更新版本的 apache。

I get the following error whenever I hit a controller action that needs to load a model:每当我点击需要加载模型的控制器操作时,我都会收到以下错误:

ErrorException [ Fatal Error ]: Class 'Model_Event' not found MODPATH/orm/classes/Kohana/ORM.php [ 46 ] ErrorException [致命错误]:找不到类“Model_Event”MODPATH/orm/classes/Kohana/ORM.php [46]

Interestingly enough, Kohana is evidently able to load the controller classes I wrote without issue.有趣的是,Kohana 显然能够毫无问题地加载我编写的控制器类。

[source root]/application/classes/Model/Event.php exists and is ugo+rx (as are the parent directories). [source root]/application/classes/Model/Event.php 存在并且是 ugo+rx(父目录也是如此)。 It contains a valid class definition (this works without issue on my local 12.04/5.3 environment).它包含一个有效的类定义(这在我的本地 12.04/5.3 环境中没有问题)。 'head -n2 [source root]/application/classes/Model/Event.php' is: 'head -n2 [source root]/application/classes/Model/Event.php' 是:

<? class Model_Event extends Model_BaseModel {

I know PHP 5.5 introduced a difference in how it does case-insensitive string comparisons, but the file/folder names and class names are an exact case match so this shouldn't be an issue here.我知道 PHP 5.5 在不区分大小写的字符串比较方面引入了差异,但文件/文件夹名称和类名称是完全大小写匹配,因此这不应该成为问题。

PHP 不尊重“short_open_tag = On” ini 设置。

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

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