Firebird 2.0
PHP5 Programming
Manual

FBIRD_SERVICE_ATTACH

Purpose

Use the fbird_service_attach function to attach to the services manager of a Firebird server.

Syntax

<service_attach> ::=
   fbird_service_attach( server, user, password )


Element 
Type
Description
server
string
Server connection string
user
string
User login name
password
string
User login password
<return>
mixed
Service handle on success, False on failure

Semantics

The fbird_service_attach function attaches to the services manager of specified server using the TCP/IP protocol. Typically, the user login name and password will be for the SYSDBA user, because most service requests are available only to the DBA.

On success this function returns a service handle for use with the other service fucntions. On failure, it returns False.

Example

The below example connects to the service manager of the Firebird server on the local machine and sends the server version to the browser.

if (($svc = fbird_service_attach('localhost',
            'sysdba', 'masterkey')) != FALSE) {
   echo fbird_server_info($svc, IBASE_SVC_SERVER_VERSION)
   fbird_service_detach($service);
}
else {
   $ib_error = fbird_errmsg();
}



See also

fbird_service_detach


previous page goto index next page

Legal information