<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Connecting to Firebird databases</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="ref.pdo-firebird.html">Firebird (PDO)</a></div> <div class="next" style="text-align: right; float: right;"><a href="ref.pdo-ibm.html">IBM (PDO)</a></div> <div class="up"><a href="ref.pdo-firebird.html">Firebird (PDO)</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="ref.pdo-firebird.connection" class="refentry"> <div class="refnamediv"> <h1 class="refname">PDO_FIREBIRD DSN</h1> <p class="verinfo">(PECL PDO_FIREBIRD >= 0.1.0)</p><p class="refpurpose"><span class="refname">PDO_FIREBIRD DSN</span> — <span class="dc-title">Connecting to Firebird databases</span></p> </div> <div class="refsect1 description" id="refsect1-ref.pdo-firebird.connection-description"> <h3 class="title">Description</h3> <p class="para"> The PDO_FIREBIRD Data Source Name (DSN) is composed of the following elements: <dl> <dt> <span class="term">DSN prefix</span> <dd> <p class="para"> The DSN prefix is <strong class="userinput"><code>firebird:</code></strong>. </p> </dd> </dt> <dt> <span class="term"><em>dbname</em></span> <dd> <p class="para"> The name of the database. </p> </dd> </dt> <dt> <span class="term"><em>charset</em></span> <dd> <p class="para"> The character set. </p> </dd> </dt> <dt> <span class="term"><em>role</em></span> <dd> <p class="para"> The SQL role name. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 examples" id="refsect1-ref.pdo-firebird.connection-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-970"> <p><strong>Example #1 PDO_FIREBIRD DSN example with path</strong></p> <div class="example-contents"><p> The following example shows a PDO_FIREBIRD DSN for connecting to Firebird databases: <div class="example-contents"><div class="cdata"><pre> firebird:dbname=/path/to/DATABASE.FDB </pre></div> </div> </p></div> </div> <div class="example" id="example-971"> <p><strong>Example #2 PDO_FIREBIRD DSN example with port and path</strong></p> <div class="example-contents"><p> The following example shows a PDO_FIREBIRD DSN for connecting to a Firebird database using hostname port and path: <div class="example-contents"><div class="cdata"><pre> firebird:dbname=hostname/port:/path/to/DATABASE.FDB </pre></div> </div> </p></div> </div> <div class="example" id="example-972"> <p><strong>Example #3 PDO_FIREBIRD DSN example with localhost and path to employee.fdb on Debian system</strong></p> <div class="example-contents"><p> The following example shows a PDO_FIREBIRD DSN for connecting to a Firebird database employee.fdb using localhost: <div class="example-contents"><div class="cdata"><pre> firebird:dbname=localhost:/var/lib/firebird/2.5/data/employee.fdb </pre></div> </div> </p></div> </div> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="ref.pdo-firebird.html">Firebird (PDO)</a></div> <div class="next" style="text-align: right; float: right;"><a href="ref.pdo-ibm.html">IBM (PDO)</a></div> <div class="up"><a href="ref.pdo-firebird.html">Firebird (PDO)</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>