Garethp Posted March 21, 2011 Share Posted March 21, 2011 Hey guys, I'm busy working on taking my companies current system and making it alot more modular, so that each module can be pulled out and work mostly on their own, with just a little custom tweaks. I have the general plan laid out, but I've run into a little snag. After managing to set up a Zend/PHP/MySQL/PHPMyAdmin enviroment on clean CentOS install, whenever I try to do a zf create project, it works, and I can visit the page saying that it's the main page, but when I create a new module (Base in this example) and go /base (After setting up the controller and view, and even the module bootstrap) it just gives me a 404. Same with /base/index and /base/index/index. Any help I could receive would be legendary Quote Link to comment https://forums.phpfreaks.com/topic/231245-zend-modules-arent-working/ Share on other sites More sharing options...
gristoi Posted March 21, 2011 Share Posted March 21, 2011 couple of things, I have my modules folder within the application folder, have you added : resources.modules='' resources.frontController.moduleDirectory = APPLICATION_PATH "/modules" into your application.ini. I had the same issue when i started trying to add modules and this sorted it Quote Link to comment https://forums.phpfreaks.com/topic/231245-zend-modules-arent-working/#findComment-1190231 Share on other sites More sharing options...
Garethp Posted March 22, 2011 Author Share Posted March 22, 2011 Yes, I have that in my application.ini, and my modules folder is inside my applications folder Quote Link to comment https://forums.phpfreaks.com/topic/231245-zend-modules-arent-working/#findComment-1190625 Share on other sites More sharing options...
gristoi Posted March 22, 2011 Share Posted March 22, 2011 Ok, this can be a right pain to get to the bottom of. A few simple things that you can easily overlook. 1. Are you following a namespace convention. Ie your index controller in the base module looks like : Class Base_IndexController extends ....... 2. The names match identically, if foldername is base then class name should start with lowercase b. I know it's really simple stuff, but the easiest problem to solve can sometimes be overlooked. I can't tell you how Many times I have come unstuck because I have accidently added a capital into one of my filenames / class names when I shouldn't off Quote Link to comment https://forums.phpfreaks.com/topic/231245-zend-modules-arent-working/#findComment-1190768 Share on other sites More sharing options...
Garethp Posted March 22, 2011 Author Share Posted March 22, 2011 Yes, I have. My module name is framework, in the Module bootstrap I've set it's namespace to be Framework (capital). The controller is controllers/IndexController.php Framework_IndexController extends Zend_Controller_Action, the view is views/scripts/index/index.phtml Quote Link to comment https://forums.phpfreaks.com/topic/231245-zend-modules-arent-working/#findComment-1190808 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.