Firebird 2.0
PHP5 Programming
Manual

FBIRD_SERVER_INFO

Purpose

Use the fbird_server_info function to retrieve information about a Firebird server instance.

Syntax

<server_info> ::=
   fbird_server_info( svc_hndl, action )


Element 
Type
Description
svc_hndl
resource
A valid service handle
action
int
Request action
<return>
mixed
String or array on success, False on failure

Semantics

The fbird_server_info function retrieves information about the server that the service handle is connected to. Note that the service handle must be associated with the SYSDBA user for this function to succeed.

The following table lists the valid values for action and a description of the information that will be returned.

Flag
Meaning

IBASE_SVC_SERVER_VERSION

Returns the Firebird server version

IBASE_SVC_IMPLEMENTATION

Returns the OS and CPU-type

IBASE_SVC_GET_ENV

Returns the root directory of the server

IBASE_SVC_GET_ENV_LOCK

Returns the location of the lock manager file on the server

IBASE_SVC_GET_ENV_MSG

Returns the location of the message file on the server

IBASE_SVC_USER_DBPATH

Returns the location of the security database on the server

IBASE_SVC_SVR_DB_INFO

Returns the number of database attachments and databases currently active on the server as an array

IBASE_SVC_GET_USERS

Returns the list of users currently registered in the security database as an array.



The IBASE_SVC_SVR_DB_INFO action returns an associative array with the following entries:

Entry
Content

'attachments'

Integer with number of attachments

'databases'

Integer with number of open databases

0, 1, 2, ...

Each numeric index holds one name of a currently open database


The IBASE_SVC_GET_USERS action returns an array with one element per user in the security database. Each element is an associative array with the following entries:

Entry
Content

'user_name'

The user's Firebird login name as a string

'first_name'

The user's first name as a string

'middle_name'

The user's middle name as a string

'last_name'

The user's last name as a string

'user_id'

The user's Posix user id as an integer

'group_id'

The user's Posix group id as an integer


Note that all values are taken from the security database. If a user's first, middle and last name are not defined in that database, the fields will contain empty strings. The user id and the the group id are only relevant on Posix systems. Servers running on Windows systems will return 0 in these fields.

Example

The below example code fragment echoes the server version to the browser.

echo fbird_server_info($svc, IBASE_SVC_SERVER_VERSION)
echo ' / '
echo fbird_server_info($service, IBASE_SVC_IMPLEMENTATION);



See also

fbird_service_attach, fbird_db_info




previous page goto index next page

Legal information