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 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 逻辑谓词和消解原理的运用
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?