PHP Doku:: Connect to the service manager - function.ibase-service-attach.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzDatenbankerweiterungenAnbieterspezifische DatenbankerweiterungenFirebird/InterBaseFirebird/InterBase Funktionenibase_service_attach

Ein Service von Reinhard Neidl - Webprogrammierung.

Firebird/InterBase Funktionen

<<ibase_server_info

ibase_service_detach>>

ibase_service_attach

(PHP 5)

ibase_service_attachConnect to the service manager

Beschreibung

resource ibase_service_attach ( string $host , string $dba_username , string $dba_password )
Warnung

Diese Funktion ist bis jetzt nicht dokumentiert. Es steht nur die Liste der Argumente zur Verfügung.


3 BenutzerBeiträge:
- Beiträge aktualisieren...
Paul Vinkenoog
17.04.2008 14:46
The previous comment is incorrect. You can connect to the Service Manager as any valid user, and connecting to the Service Manager is not the same as connecting to the security database. However, some of the service functions (which you may subsequently call with the service handle returned by ibase_service_attach) are only available to SYSDBA.
houston_roadrunner at yahoo dot com
19.04.2006 18:47
When using this function it looks like you can only use SYSDBA as the user, as you are connecting to the security database. This is a restriction by the interbase/firebird server.

12.04.2006 10:58
An example of ibase_service_attach:
<?php
   
//attach to the server running on localhost
   
if (($service = ibase_service_attach('localhost', 'sysdba', 'masterkey')) != FALSE) {
       
//retrieve server info
       
$server_info  = ibase_server_info($service, IBASE_SVC_SERVER_VERSION)
                      .
' / '
                     
. ibase_server_info($service, IBASE_SVC_IMPLEMENTATION);
       
//detach from server (disconnect)
       
ibase_service_detach($service);
    }
    else {
       
$ib_error = ibase_errmsg();
    }
echo
$server_info;
?>
Should echo something like:

 WI-T2.0.0.12484 Firebird 2.0 Release Candidate 1 / Firebird/x86/Windows NT

Taken/adapted from ibWebAdmin source code



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)