开发者

Codeigniter App on EC2 - Helpers not loading

I recently just started to migrate over a CI application t开发者_开发问答o Amazon's EC2 service. To test I set up a micro instance of ubuntu and a LAMP stack. PHP, MySQL, HTTPD are all working beautifully. The one issue i'm having now is that when I run my application I receive an error saying that my helpers won't load. The helpers in particular that aren't loading are the ones in subdirectories in the helpers directory ie: /var/www/system/application/helpers/subdirectory/foo_helper.php

The helpers are being autoloaded and in my autoload.php config file they are written like:

$autoload['helper'] = array('subdirectory/foo', 'foo2',...); 

Has anyone run into this issue, or have any pointers on where I could go look in my configuration to resolve this?

Thanks for the help!


I'd try debugging the helper function of the Loader class, in particular these lines :

system/libraries/Loader.php

elseif (file_exists(APPPATH.'helpers/'.$helper.EXT))
{ 
    include_once(APPPATH.'helpers/'.$helper.EXT);
}

This is the code that will be hit when including application helpers. Check what path CodeIgniter is trying to include. Double check that the path exists - everyone makes typos now and again ;-)


I think the issue is that when I moved from Windows to Linux I forgot to take into account that linux is case-sensitive. So now I need to go through and rename my files and folders.

But this still doesn't solve the issue where it seems like the page is being cached and I'm not able to refresh and see my changes. Is there any way to force the page to grab a fresh copy from the server on every refresh?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜