I modified my setup a bit after doing more research on fixing my
issue...(Issue still unresolved!)
I have removed the following function from my bootstrap located in the
root/application directory
protected function _initAutoload()
{
$loader = new Zend_Application_Module_Autoloader(
array(
'namespace' => '',
'basePath' => APPLICATION_PATH . '/modules/default'),
array(
'namespace' => 'Membership_',
'basePath' => APPLICATION_PATH . '/modules/membership'));
return $loader;
}
I added module specific bootstrap files to both the default and membership
modules, and split up the above function into the corresponding module. For
example, I added the following function to
root/application/modules/membership:
protected function _initAutoload()
{
$loader = new Zend_Application_Module_Autoloader(
array(
'namespace' => 'Membership_',
'basePath' => APPLICATION_PATH . '/modules/membership'));
return $loader;
}
and this to root/application/modules/default:
{
$loader = new Zend_Application_Module_Autoloader(
array(
'namespace' => '',
'basePath' => APPLICATION_PATH . '/modules/default'),
return $loader;
}
My application.ini file in root/application/config contains the following
resources entries:
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.defaultControllerName = "index"
resources.frontController.defaultAction = "index"
resources.frontController.defaultModule = "default"
resources.frontController.baseUrl = "/public"
resources.modules[] =
The line "resources.modules[]=" should be executing the module autoloaders
in each of the module specific bootstraps. Viola...that should be all that
is needed to setup basic modules...correct?
All of this is extra since the original method of setup worked on a
localhost setup, but did not translate to shared hosting. If I remove the
call to Membership_Form_Login from my front layout, then the
default/index/index action loads perfectly. That tells me that on the
shared setup my default module is located and working (for the index
controller at least). Why is the framework unable to autoload the
Membership_Form_Login class on shared hosting, but can find it on the local
setup? Is there any other information that I could post to kick start some
ideas? I have compared the location path that calls Membership_Form_Login
on my local setup to the location path on the hosted site including case
sensitivity. I have tested my htaccess setup by keying in a path to any
other file that I uploaded (ex:
web-root/application/config/application.ini), and that test took me back to
my index.php gateway file. I can successfully pull up files in my public
folder (ex: css or images).
Any suggestions about what to look at next?
Thank you,
Shaun
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/Problems-autoloading-modules-on-shared-hosting-tp2063729p2065655.html
Sent from the Zend Framework mailing list archive at Nabble.com.