Rechercher une fonction PHP

ibase_service_attach

(PHP 5, PHP 7)

ibase_service_attachConnect to the service manager

Description

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

PHP: ibase_service_attach - Manual Home of Manuel PHP  Contents Haut

Parameters

host

The name or ip address of the database host. You can define the port by adding '/' and port number. If no port is specified, port 3050 will be used.

dba_username

The name of any valid user.

dba_password

The user's password.

PHP: ibase_service_attach - Manual Home of Manuel PHP  Contents Haut

Return Values

Returns a Interbase / Firebird link identifier on success or FALSE on failure.

PHP: ibase_service_attach - Manual Home of Manuel PHP  Contents Haut

Examples

Example #1 ibase_service_attach() example

<?php
    
// Attach to the remote Firebird server by ip address
    
if (($service ibase_service_attach('10.1.1.199''sysdba''masterkey')) != FALSE) {
        
        
// Successfully attached. 
        // Fetch server version (something like 'LI-V3.0.4.33054 Firebird 3.0')
        
$server_version  ibase_server_info($serviceIBASE_SVC_SERVER_VERSION);

        
// Fetch server implementation (something like 'Firebird/Linux/AMD/Intel/x64')
        
$server_implementation ibase_server_info($serviceIBASE_SVC_IMPLEMENTATION);

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

        
// Output the info
        
echo "Server version: " $server_version "<br/>";
        echo 
"Server implementation: " $server_implementation;
    }
    else {
        
// Output message on error
        
$conn_error ibase_errmsg();
        die(
$conn_error);
    }

?>

Example #2 ibase_service_attach() example using hostname/port syntax

<?php
    
// Attach to the remote Firebird server by name. Use Port 3050.
    
if (($service ibase_service_attach('FB-SRV-01.contoso.local/3050''sysdba''masterkey')) != FALSE) {
        
        
// Successfully attached. 
        // Fetch server version (something like 'LI-V3.0.4.33054 Firebird 3.0')
        
$server_version  ibase_server_info($serviceIBASE_SVC_SERVER_VERSION);

        
// Fetch server implementation (something like 'Firebird/Linux/AMD/Intel/x64')
        
$server_implementation ibase_server_info($serviceIBASE_SVC_IMPLEMENTATION);

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

        
// Output the info
        
echo "Server version: " $server_version "<br/>";
        echo 
"Server implementation: " $server_implementation;
    }
    else {
        
// Output message on error
        
$conn_error ibase_errmsg();
        die(
$conn_error);
    }

?>

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-ibase-service-attach.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