title: No instance returned Zend Framework 2?
body: <p>I have developed one project and successfully works on my local machine.on live site i create one folder dev in public_html and move same project from local machine,but  its gives me following error. </p>
  
  <blockquote>
    <p>Zend\ServiceManager\Exception\ServiceNotCreatedException</p>
  </blockquote>
  
  <pre><code>File: /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:859
  Message: An exception was raised while creating "Front/Model/Slider"; no instance returned
  </code></pre>
  
  <blockquote>
    <p>Zend\ServiceManager\Exception\ServiceNotCreatedException  </p>
  </blockquote>
  
  <pre><code>File: /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:859
  Message: An exception was raised while creating "Zend\Db\Adapter\Adapter"; no instance returned
  </code></pre>
  
  <blockquote>
    <p>Zend\Db\Adapter\Exception\RuntimeException</p>
  </blockquote>
  
  <pre><code>File: /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Driver/Pdo/Pdo.php:218
  Message: The PDO extension is required for this adapter but the extension is not loaded..
  </code></pre>
  
  <p>My Service Factory means model.config.php file is: </p>
  
  <pre><code>&lt;?php
      namespace Front;
      /*use Zend\ModuleManager\ModuleManager;*/
      class Module
      {
          public function getAutoloaderConfig()
          {
              return array('Zend\Loader\StandardAutoloader' =&gt;
                  array('namespaces' =&gt;
                      array(__NAMESPACE__ =&gt; __DIR__ . '/src/' . __NAMESPACE__,),
                  ),
              );
          }
      /*    public function init(ModuleManager $moduleManager)
          {
              $sharedEvents = $moduleManager-&gt;getEventManager()-&gt;getSharedManager();
              $sharedEvents-&gt;attach(__NAMESPACE__, 'dispatch', function($e) {
                  // This event will only be fired when an ActionController under the MyModule namespace is dispatched.
                  $controller = $e-&gt;getTarget();
                  $controller-&gt;layout('layout/frontlayout');
              }, 100);
          }
      */
          public function getConfig()
          {
              return include __DIR__ . '/config/module.config.php';
          }
          // Add this method:
          public function getServiceConfig()
          {
              return array(
                  'factories' =&gt; array(
  
                      'Front\Model\Cms' =&gt;  function($sm) {
                          $dbAdapter = $sm-&gt;get('Zend\Db\Adapter\Adapter');
                          $table     = new \Front\Model\Cms($dbAdapter);
                          return $table;
                      },
  
                      'Front\Model\Slider' =&gt; function($sm) {
                          $dbAdapter = $sm-&gt;get('Zend\Db\Adapter\Adapter');
                          $table     = new \Front\Model\Slider($dbAdapter);
                          return $table;
                      },
  
                  ),
              );
          }
      }
      ?&gt;
  </code></pre>
  
  <p>Stack Trace is like this: </p>
  
  <blockquote>
    <p>Zend\ServiceManager\Exception\ServiceNotCreatedException</p>
  </blockquote>
  
  <pre><code>File: /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:859
  Message: An exception was raised while creating "Front/Model/Slider"; no instance returned
  
  #0 /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php(984): Zend\ServiceManager\ServiceManager-&gt;createServiceViaCallback(Object(Closure), 'frontmodelslide...', 'Front/Model/Sli...')
  #1 /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php(597): Zend\ServiceManager\ServiceManager-&gt;createFromFactory('frontmodelslide...', 'Front/Model/Sli...')
  #2 /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php(556): Zend\ServiceManager\ServiceManager-&gt;doCreate('Front/Model/Sli...', 'frontmodelslide...')
  #3 /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php(480): Zend\ServiceManager\ServiceManager-&gt;create(Array)
  #4 /home/projectname/public_html/dev/module/Front/src/Front/Controller/FrontController.php(65): Zend\ServiceManager\ServiceManager-&gt;get('Front/Model/Sli...')
  #5 /home/projectname/public_html/dev/module/Front/src/Front/Controller/FrontController.php(53): Front\Controller\FrontController-&gt;getSlider()
  #6 /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(83): Front\Controller\FrontController-&gt;indexAction()
  #7 [internal function]: Zend\Mvc\Controller\AbstractActionController-&gt;onDispatch(Object(Zend\Mvc\MvcEvent))
  #8 /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
  #9 /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager-&gt;triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
  #10 /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(117): Zend\EventManager\EventManager-&gt;trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
  #11 /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController-&gt;dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
  #12 [internal function]: Zend\Mvc\DispatchListener-&gt;onDispatch(Object(Zend\Mvc\MvcEvent))
  #13 /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
  #14 /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager-&gt;triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
  #15 /home/projectname/public_html/dev/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(309): Zend\EventManager\EventManager-&gt;trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
  #16 /home/projectname/public_html/dev/public/index.php(17): Zend\Mvc\Application-&gt;run()
  #17 {main}
  </code></pre>