The Zend2 Framework module could not be initialized

advertisements

I am trying to install Zend2 Framework module for mobile detection. Module is called Mobile Detect. I am following instructions given on that page, so i have cloned Mobile-Detect and the entire project from first link in vendor directory via git shell. I have added 'Neilime\MobileDetect'in application.config.php file and it shows me this error:

Fatal error: Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException' with message 'Module (Neilime\MobileDetect) could not be initialized.' in
D:\xampp\htdocs\zend2test\vendor\zendframework\zendframework\library\Zend\ModuleManager\ModuleManager.php:144 Stack trace: #0
D:\xampp\htdocs\zend2test\vendor\zendframework\zendframework\library\Zend\ModuleManager\ModuleManager.php(85): Zend\ModuleManager\ModuleManager->loadModule('Neilime\MobileD...') #1
[internal function]: Zend\ModuleManager\ModuleManager->onLoadModules(Object(Zend\ModuleManager\ModuleEvent)) #2
D:\xampp\htdocs\zend2test\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php(464): call_user_func(Array, Object(Zend\ModuleManager\ModuleEvent)) #3
D:\xampp\htdocs\zend2test\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php(208): Zend\EventManager\EventManager->triggerListeners('loadModules', Object(Zend\ModuleManager\ModuleEvent), NULL) #4
D:\xampp\htdocs\zend2test\vendor\zendframework\zendframework\libra in
D:\xampp\htdocs\zend2test\vendor\zendframework\zendframework\library\Zend\ModuleManager\ModuleManager.php on line 144


I'd recommend using the composer installation method given in the docs instead.

If you really want to stick with git clone, try:

git clone [email protected]:neilime/zf2-mobile-detect.git Neilime/MobileDetect

from the vendor folder instead, which should clone it to the correct path.