ankur0101 Posted January 31, 2012 Share Posted January 31, 2012 Hi, Here is a structure of my testing site : under document root ->>> Uploaded with ImageShack.us When I go to localhost/zend , I get following error : Fatal error: Uncaught exception 'UnexpectedValueException' with message 'DirectoryIterator::__construct(/application/modules,/application/modules) [<a href='directoryiterator.--construct'>directoryiterator.--construct</a>]: The system cannot find the path specified. (code: 3)' in D:\xampp\php\includes\Zend\Controller\Front.php:289 Stack trace: #0 D:\xampp\php\includes\Zend\Controller\Front.php(289): DirectoryIterator->__construct('/application/mo...') #1 D:\xampp\htdocs\zend\index.php(: Zend_Controller_Front->addModuleDirectory('/application/mo...') #2 {main} Next exception 'Zend_Controller_Exception' with message 'Directory /application/modules not readable' in D:\xampp\php\includes\Zend\Controller\Front.php:292 Stack trace: #0 D:\xampp\htdocs\zend\index.php(: Zend_Controller_Front->addModuleDirectory('/application/mo...') #1 {main} thrown in D:\xampp\php\includes\Zend\Controller\Front.php on line 292 What to do ? Quote Link to comment https://forums.phpfreaks.com/topic/256107-addmoduledirectory-is-not-working-in-zend/ Share on other sites More sharing options...
premiso Posted January 31, 2012 Share Posted January 31, 2012 It looks like you are referring to the root of the drive with the initial slash. Try removing that slash and see how it goes. If that does not work, we need the actual code you are using where the addModuleDirectory code is. The main thing is, the path has to be found and either needs to be relative to the directory, in the include path or needs to be absolute from the root of the drive. Quote Link to comment https://forums.phpfreaks.com/topic/256107-addmoduledirectory-is-not-working-in-zend/#findComment-1313134 Share on other sites More sharing options...
ankur0101 Posted February 1, 2012 Author Share Posted February 1, 2012 Hi, Following is a code of D:/xampp/htdocs/zend/index.php <?php // Load Front controller class require_once('Zend/Controller/Front.php'); $frontController = Zend_Controller_Front::getInstance(); $frontController->addModuleDirectory('/application/modules'); $frontController->throwException(true); $frontController->dispatch(); ?> If I make it as application/modules i.e. removing slash /, it gives following error : Fatal error: Call to undefined method Zend_Controller_Front::throwException() in D:\xampp\htdocs\zend\index.php on line 10 Quote Link to comment https://forums.phpfreaks.com/topic/256107-addmoduledirectory-is-not-working-in-zend/#findComment-1313318 Share on other sites More sharing options...
premiso Posted February 1, 2012 Share Posted February 1, 2012 So your line after the modules function does not exist. Read the manual on the frontController to find out what that method should be. Quote Link to comment https://forums.phpfreaks.com/topic/256107-addmoduledirectory-is-not-working-in-zend/#findComment-1313364 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.