0 Replies Latest reply on Nov 17, 2011 3:08 AM by Frank F._

    Flash Builder for PHP Zend_DB_Adapter

    Frank F._ Level 1

      I've written my first PHP project, which builds up a dataconnection to a mssql-Sever.

       

      Instead of working with the PHP extension SQLSRV, I plan to use the Zend db_adapter.

      Im try to implement the following class method:

       

      try {
      $db = new Zend_Db_Adapter_Pdo_Mssql($connectionInfo);
      $db->getConnection();
      } catch (Zend_Db_Adapter_Exception $e) {
      throw new Exception($e);
      }

      Sorry, i don't know how i can here typing source code....

       

      On my Webserver, i copied the Zend Framework 1.11.

       

      I add in the associated Flex project a Data / Service -> Php Zend and test the method via the build in Test Operation and get the follwing error message:


      Server error exception 'Zend_Db_Adapter_Exception' with message 'The mssql driver is not currently installed' in C:\inetpub\wwwroot\ZendFramework\library\Zend\Db\Adapter\Pdo\Abstract.php:112 Stack trace: #0 C:\inetpub\wwwroot\ZendFramework\library\Zend\Db\Adapter\Pdo\Mssql.php(137): Zend_Db_Adapter_Pdo_Abstract->_connect() #1 C:\inetpub\wwwroot\ZendFramework\library\Zend\Db\Adapter\Abstract.php(315): Zend_Db_Adapter_Pdo_Mssql->_connect() #2 C:\inetpub\wwwroot\WebManagers\services\Logon.php(27): Zend_Db_Adapter_Abstract->getConnection() #3 C:\inetpub\wwwroot\WebManagers\services\Logon.php(35): Logon->connect() #4 [internal function]: Logon->getUserByName() #5 [internal function]: ReflectionMethod->invokeArgs(Object(Logon), Array) #6 C:\inetpub\wwwroot\ZendFramework\library\Zend\Server\Reflection\Function\Abstract.php(380 ): call_user_func_array(Array, Array) #7 C:\inetpub\wwwroot\ZendFramework\library\Zend\Amf\Server.php(365): Zend_Server_Reflection_Function_Abstract->__call('invokeArgs', Array) #8 C:\inetpub\wwwroot\ZendFramework\library\Zend\Amf\Server.php(365): Zend_Server_Reflection_Method->invokeArgs(Object(Logon), Array) #9 C:\inetpub\wwwroot\ZendFramework\library\Zend\Amf\Server.php(580): Zend_Amf_Server->_dispatch('getUserByName', Array, 'Logon') #10 C:\inetpub\wwwroot\ZendFramework\library\Zend\Amf\Server.php(657): Zend_Amf_Server->_handle(Object(Zend_Amf_Request_Http)) #11 C:\inetpub\wwwroot\WebManagers\public\gateway.php(68): Zend_Amf_Server->handle() #12 {main} #0 C:\inetpub\wwwroot\WebManagers\services\Logon.php(35): Logon->connect() #1 [internal function]: Logon->getUserByName() #2 [internal function]: ReflectionMethod->invokeArgs(Object(Logon), Array) #3 C:\inetpub\wwwroot\ZendFramework\library\Zend\Server\Reflection\Function\Abstract.php(380 ): call_user_func_array(Array, Array) #4 C:\inetpub\wwwroot\ZendFramework\library\Zend\Amf\Server.php(365): Zend_Server_Reflection_Function_Abstract->__call('invokeArgs', Array) #5 C:\inetpub\wwwroot\ZendFramework\library\Zend\Amf\Server.php(365): Zend_Server_Reflection_Method->invokeArgs(Object(Logon), Array) #6 C:\inetpub\wwwroot\ZendFramework\library\Zend\Amf\Server.php(580): Zend_Amf_Server->_dispatch('getUserByName', Array, 'Logon') #7 C:\inetpub\wwwroot\ZendFramework\library\Zend\Amf\Server.php(657): Zend_Amf_Server->_handle(Object(Zend_Amf_Request_Http)) #8 C:\inetpub\wwwroot\WebManagers\public\gateway.php(68): Zend_Amf_Server->handle() #9 {main}

       

      Checking my Webserver i found that:

      In the directory of the path "ZendFramework\library\Zend\Db\Adapter" there is a file SQLSRV.PHP and also a folder named SQLSRV.

      In the directory of the path "C:\inetpub\wwwroot\ZendFramework\library\Zend\Db\Adapter\Pdo" there is just a file named mssql.srv.

       

      In the Flash Builder for PHP there is no Class named Zend_Db_Adapter_Pdo_Sqlsrv.

       

       

      Internet searches have revealed that since 1.9 the Zend class SQLSRV is used instead of mssql.
      How can i install the right method on the server side or in the Flex Builder?
      BR
      Frank