doutui2883 2012-08-23 14:13 采纳率: 100%
浏览 73
已采纳

Bootstrap资源加载在linux和windows中不同

I have a Zend Framework application with a custom library for my company. The resources I've created under the custom library load just fine in Windows on our dev environments. I just tried to move this to a linux box this morning and I'm getting the following error:

Fatal error: Uncaught exception 'Zend_Application_Bootstrap_Exception' with message 'Resource matching "errorLogger" not found' in /home/nick/Repos/myfirstzend.com/includes/library/Zend/Application/Bootstrap/BootstrapAbstract.php on line 694

I have my plugin path set in the constructor of my bootstrap like this:

$this->setOptions(array(
            'pluginPaths' => array('Company_Application_Resource' => 'Company/Application/Resource')
));

I then try to pass the following array (in a different _init method within the bootstrap):

$resources['errorLogger'] = array(
                'stream' => array(
                    'writerName' => 'db',
                    'writerParams' => array(
                        'db' => array(
                            'dbname' => APPLICATION_PATH . '/logs/errorLog.sqlite'
                        )
                    )
                )
            );

to the following method:

$this->registerPluginResource($resourceName, $resourceOptions);

Where $resourceName is the key of that initial array ('errorLogger') and $resourceOptions is the array at that key.

I have ErrorLogger.php under library/Company/Application/Resource/ and the class name is class Company_Application_Resource_ErrorLogger extends Zend_Application_Resource_Log.

I'm at a loss. Anyone see what I'm doing wrong?

Is there a series of var_dumps I could do to figure this out? I'm at a loss here.

Edit: Bootstrap code.

  • 写回答

2条回答 默认 最新

  • 普通网友 2012-10-18 00:42
    关注

    Try stepping through the problem area using Xdebug along with something that will let you interactively debug it (e.g. Eclipse PDT). This should give you an idea of why things are going awry.

    Short of dumping all of your library code, this seems like the only answer I can come up with.

    Also, I would try renaming the resource. If I recall, Zend has a problem with a resource of that name.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换