Problem including Zend Framework Action Helpers?
Posted: Wed Jul 15, 2009 2:32 am
I have action helper directories in these places:
/files/library/Zend/Controller/Action/Helper
/files/library/Rac/Controller/Action/Helper
/files/application/classes/Controller/Action/Helper
/files/application/classes/modules/user/classes/Controller/Action/Helper
I've added the prefixes thusly:
I've set include paths thusly:
In Bootstrap file:
In my extension of Zend_Controller_Action:: init():
This is the error I get when I try to load the standard Zend Url action helper:
Warning: include_once(Controller\Action\Helper/Url.php) [function.include-once]: failed to open stream: No such file or directory in C:\xampp\files\library\Zend\Loader\PluginLoader.php on line 375
Warning: include_once() [function.include]: Failed opening 'Controller\Action\Helper/Url.php' for inclusion (include_path='.;C:\xampp\php\pear\;C:\xampp\files/application/classes;C:\xampp\files/library;C:\xampp\files/application/modules/user/classes') in C:\xampp\files\library\Zend\Loader\PluginLoader.php on line 375
It's looking in all the correct paths and loading the actual helper just fine, but I'm still getting this error. What am I doing wrong?
I wasn't sure if it was wise to have two classes folders with the same namespace... is that screwing me up here? I just figured that the first file found was included?
/files/library/Zend/Controller/Action/Helper
/files/library/Rac/Controller/Action/Helper
/files/application/classes/Controller/Action/Helper
/files/application/classes/modules/user/classes/Controller/Action/Helper
I've added the prefixes thusly:
Code: Select all
$prefix = 'Rac_Controller_Action_Helper';
Zend_Controller_Action_HelperBroker::addPrefix($prefix);
$prefix = 'Controller_Action_Helper';
Zend_Controller_Action_HelperBroker::addPrefix($prefix);
In Bootstrap file:
Code: Select all
$rootDir = dirname(dirname(__FILE__));
define('ROOT_DIR', $rootDir);
set_include_path(get_include_path()
. PATH_SEPARATOR . ROOT_DIR . '/application/classes'
. PATH_SEPARATOR . ROOT_DIR . '/library');Code: Select all
$path = ROOT_DIR . '/application/modules/'.$module.'/classes';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);Warning: include_once(Controller\Action\Helper/Url.php) [function.include-once]: failed to open stream: No such file or directory in C:\xampp\files\library\Zend\Loader\PluginLoader.php on line 375
Warning: include_once() [function.include]: Failed opening 'Controller\Action\Helper/Url.php' for inclusion (include_path='.;C:\xampp\php\pear\;C:\xampp\files/application/classes;C:\xampp\files/library;C:\xampp\files/application/modules/user/classes') in C:\xampp\files\library\Zend\Loader\PluginLoader.php on line 375
It's looking in all the correct paths and loading the actual helper just fine, but I'm still getting this error. What am I doing wrong?
I wasn't sure if it was wise to have two classes folders with the same namespace... is that screwing me up here? I just figured that the first file found was included?