Rechercher une fonction PHP

ibase_server_info

(PHP 5, PHP 7)

ibase_server_infoRequest information about a database server

Description

ibase_server_info ( resource $service_handle , int $action ) : string

PHP: ibase_server_info - Manual Home of Manuel PHP  Contents Haut

Parameters

service_handle

A previously created connection to the database server.

action

A valid constant.

PHP: ibase_server_info - Manual Home of Manuel PHP  Contents Haut

Return Values

Returns mixed types depending on context.

PHP: ibase_server_info - Manual Home of Manuel PHP  Contents Haut

Examples

Example #1 ibase_service_attach() example

<?php
    
// Attach to the remote Firebird server
    
if (($service ibase_service_attach('10.1.1.254/3050''sysdba''masterkey')) != FALSE) {

        
// Successfully attached.

        // Output the info
        
echo "Server version: " ibase_server_info($serviceIBASE_SVC_SERVER_VERSION) . "\n";
        echo 
"Server implementation: " ibase_server_info($serviceIBASE_SVC_IMPLEMENTATION) . "\n";
        echo 
"Server users: " print_r(ibase_server_info($serviceIBASE_SVC_GET_USERS), true) . "\n";
        echo 
"Server directory: " ibase_server_info($serviceIBASE_SVC_GET_ENV) . "\n";
        echo 
"Server lock path: " ibase_server_info($serviceIBASE_SVC_GET_ENV_LOCK) . "\n";
        echo 
"Server lib path: " ibase_server_info($serviceIBASE_SVC_GET_ENV_MSG) . "\n";
        echo 
"Path of user db: " ibase_server_info($serviceIBASE_SVC_USER_DBPATH) . "\n";
        echo 
"Established connections: " print_r(ibase_server_info($serviceIBASE_SVC_SVR_DB_INFO),true) . "\n";

        
// Detach from server (disconnect)
        
ibase_service_detach($service);

    }
    else {
        
// Output message on error
        
$conn_error ibase_errmsg();
        die(
$conn_error);
    }
?>

The above example will output:

Server version: LI-V3.0.4.33054 Firebird 3.0
Server implementation: Firebird/Linux/AMD/Intel/x64
Server users: Array
(
    [0] => Array
        (
            [user_name] => SYSDBA
            [first_name] => Sql
            [middle_name] => Server
            [last_name] => Administrator
            [user_id] => 0
            [group_id] => 0
        )

)

Server directory: /etc/firebird/
Server lock path: /tmp/firebird/
Server lib path: /usr/lib64/firebird/lib/
Path of user db: /var/lib/firebird/secdb/security3.fdb
Established connections: Array
(
    [attachments] => 3
    [databases] => 2
    [0] => /srv/firebird/poss.fdb
    [1] => /srv/firebird/employees.fdb
)

Find a PHP function

English translation

You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.

If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.

Thank you in advance.

Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-function.ibase-server-info.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:fr Manuel PHP : http://php.net

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut