Jump to content

addModuleDirectory is not working in Zend


Recommended Posts


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(8): 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(8): Zend_Controller_Front->addModuleDirectory('/application/mo...') #1 {main} thrown in D:\xampp\php\includes\Zend\Controller\Front.php on line 292


What to do ?


Link to post
Share on other sites

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.

Link to post
Share on other sites


Following is a code of D:/xampp/htdocs/zend/index.php



// Load Front controller class

$frontController = Zend_Controller_Front::getInstance();






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


Link to post
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.