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 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用