Subject | Re: [firebird-php] Does ZF2 PDO Firebird DB Adapter works? |
---|---|
Author | Diego Andres Garcia |
Post date | 2014-10-22T16:44:13Z |
exactlyOn 22/10/14 17:02, Diego Andres Garcia dgarcia@...
[firebird-php] wrote:
> thanx for the answer
>
> using plane php i can connect without any issues
By which you mean
$str_conn = "firebird:dbname=server4/3050:e:\fbdata\SIGELPRESTDEV.FDB";
$dbh = new PDO($str_conn, "SYSDBA", "masterkey");
> i need to use zf2 (Zend framework 2) for several reasons (sorry, too
> long to explain)
Which uses
$params = array(
'host' => 'server4',
'username' => 'SYSDBA',
'password' => 'masterkey',
'dbname' => 'e:\fbdata\SIGELPRESTDEV.FDB'
);
$db = Zend_Db::factory('pdo_firebird', $params);
Not sure that Zend actually handles the port number - but 3050 should be
the default anyway.
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
ZF2:
return array(
'db' => array(
'driver' => 'Pdo',
'dsn' => 'firebird',
'dbname' => 'e:\fbdata\SIGELPRESTDEV.FDB',
'host' => 'server4',
'username' => 'SYSDBA',
'password' => 'masterkey',
),
'service_manager' => array(
'factories' => array(
'Zend\Db\Adapter\Adapter' => 'Zend\Db\Adapter\AdapterServiceFactory',
),
),
);
also I tried:
return array(
'db' => array(
'driver' => 'Pdo',
'dsn' => 'firebird:dbname=e:\fbdata\SIGELPRESTDEV.FDB;host=server4;charset=utf8',
'username' => 'SYSDBA',
'password' => 'masterkey',
),
'service_manager' => array(
'factories' => array(
'Zend\Db\Adapter\Adapter' => 'Zend\Db\Adapter\AdapterServiceFactory',
),
),
);
and plane PHP:
$dsn = "firebird:dbname=server4:e:\fbdata\SIGELPRESTDEV.FDB";
$username = "SYSDBA";
$passwd = "masterkey";
$pdo = new \PDO($dsn, $username, $passwd);
-- Diego Andrés García Analista Programador Universitario Departamento de informática DASU - Obra Social del Personal de la Universidad Nacional de la Patagonia Comodoro Rivadavia, Chubut, Argentina Teléfono (0297) 446-4444 int. 103 Correo electrónico: dgarcia@... Website: www.dasu.com.ar
--
Antes de imprimir este mensaje, piense si es verdaderamente necesario hacerlo.