1

I think its a simple path issue here - but I've spent last 2 hours trying various combinations but not able to resolve this. The code is working fine on my windows system but when I upload it to my hosting site on linux OS - it doesn't find the ACL file.

This is how the paths are defined in my index.php

// Define path to application directory
defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(realpath(APPLICATION_PATH . '/../library'),    get_include_path(),
)));

This is the line in application.ini

resources.frontController.plugins.acl = "Ed_Controller_Plugin_Acl"

This is the bootstrap.php relevant code

protected function _initAutoload()
{
   .......
   Zend_Loader_Autoloader::getInstance()->registerNamespace('Ed_');
   .......
}

These are the errors I am getting on the linux system and the ACL doesn't work

[Sat Oct 01 14:26:44 2011] [error] [client 122.164.175.204] PHP Warning:  include_once(Ed/Controller/Plugin/Acl.php): failed to open stream: No such file or directory in /home/webadmin/dezyre.com/library/Zend/Loader.php on line 146

[Sat Oct 01 14:26:44 2011] [error] [client 122.164.175.204] PHP Warning:  include_once(): Failed opening 'Ed/Controller/Plugin/Acl.php' for inclusion (include_path='/home/webadmin/dezyre.com/application/../library:/home/webadmin/dezyre.com/library:.:/usr/share/pear:/usr/share/php') in /home/webadmin/dezyre.com/library/Zend/Loader.php on line 146

[Sat Oct 01 14:26:44 2011] [error] [client 122.164.175.204] PHP Fatal error:  Class 'Ed_Controller_Plugin_Acl' not found in /home/webadmin/dezyre.com/library/Zend/Application/Resource/Frontcontroller.php on line 117

Thanks for your time Appreciate it

Gublooo
  • 2,550
  • 8
  • 54
  • 91
  • Is the Ed folder in your library folder? Where is that kept? Everything looks pretty good from what I see. – drew010 Oct 01 '11 at 19:33
  • Yes the Ed folder and the Zend folder are inside library - the weird thing is it works on my windows environment where I develop - when I uploaded to the hosting site - it can't find it – Gublooo Oct 01 '11 at 19:47
  • 1
    Did you check the filenames? Remember that linux is case-sensitive - maybe you named a file/directory in lowercase? – Fge Oct 01 '11 at 21:53
  • @Fge - spot on - the plugin folder was all lower case - if u post that as an answer - I'll go ahead and accept it - Thanks – Gublooo Oct 08 '11 at 10:07

1 Answers1

0

Remember that *ix is all case sensitive with file names. Therefore directories must start with in uppercase. If they don't, Windows won't complain - but Linux will.

Fge
  • 2,971
  • 4
  • 23
  • 37