PHP Doku:: Add a user to a security database (only for IB6 or later) - function.ibase-add-user.html

Verlauf / Chronik / History: (37) anzeigen

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

Ein Service von Reinhard Neidl - Webprogrammierung.

Firebird/InterBase Funktionen

<<Firebird/InterBase Funktionen

ibase_affected_rows>>

ibase_add_user

(PHP 4 >= 4.2.0, PHP 5)

ibase_add_userAdd a user to a security database (only for IB6 or later)

Beschreibung

bool ibase_add_user ( resource $service_handle , string $user_name , string $password [, string $first_name [, string $middle_name [, string $last_name ]]] )

PHP 4 uses server, dba_user_name and dba_user_password instead of service_handle parameter.

Warnung

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

Rückgabewerte

Gibt bei Erfolg TRUE zurück. Im Fehlerfall wird FALSE zurückgegeben.

Siehe auch


Ein BenutzerBeitrag:
- Beiträge aktualisieren...
pabloj
12.04.2006 11:10
You can create users on Firebird/Interbase this way:

<?php
   
// attach to the server with proper privileges
   
if (($service = ibase_service_attach('localhost', 'sysdba', 'masterkey')) != FALSE) {
       
// get server version and implementation strings
       
$server_info  = ibase_server_info($service, IBASE_SVC_SERVER_VERSION)
                      .
' / '
                     
. ibase_server_info($service, IBASE_SVC_IMPLEMENTATION);
       
//ibase_service_detach($service);
   
}
    else {
       
$ib_error = ibase_errmsg();
    }
echo
$server_info;

//add a new user with name 'pippo' and password 'pp'
if (($result = ibase_add_user($service, 'pippo', 'pp')) != FALSE) {
        echo
'User created';
       
ibase_service_detach($service);
    }
    else {
       
$ib_error = ibase_errmsg();
       
//detach from server
       
ibase_service_detach($service);
    } 
?>



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",...)